From 44ec91ca4d5f082f2069ac23f05f73c7be9ada32 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 21 Oct 2016 15:12:02 +0100 Subject: [PATCH] Remove debian/patches/* We are going to rebase the dgit-imported patch queue, as git commits. They will be turned back into quilt patches just before push. Signed-off-by: Ian Jackson --- debian/patches/CVE-2015-7812.diff | 59 ----- debian/patches/CVE-2015-7813.diff | 55 ----- debian/patches/CVE-2015-7814.diff | 50 ---- debian/patches/CVE-2015-7835.diff | 57 ----- debian/patches/CVE-2015-7969.1.diff | 42 ---- debian/patches/CVE-2015-7969.diff | 35 --- debian/patches/CVE-2015-7970.diff | 221 ----------------- debian/patches/CVE-2015-7971.diff | 83 ------- debian/patches/CVE-2015-7972.diff | 86 ------- debian/patches/config-prefix.diff | 36 --- debian/patches/series | 35 --- ...igure-time-choice-of-libexec-subdire.patch | 233 ------------------ debian/patches/tools-blktap2-prefix.diff | 154 ------------ debian/patches/tools-console-prefix.diff | 33 --- debian/patches/tools-include-install.diff | 30 --- debian/patches/tools-libfsimage-abiname.diff | 60 ----- debian/patches/tools-libfsimage-prefix.diff | 53 ---- debian/patches/tools-libxc-abiname.diff | 99 -------- debian/patches/tools-libxl-abiname.diff | 80 ------ debian/patches/tools-libxl-prefix.diff | 56 ----- debian/patches/tools-misc-prefix.diff | 28 --- debian/patches/tools-pygrub-prefix.diff | 59 ----- ...tools-pygrub-remove-static-solaris-support | 86 ------- debian/patches/tools-python-prefix.diff | 46 ---- debian/patches/tools-rpath.diff | 23 -- debian/patches/tools-xcutils-rpath.diff | 23 -- debian/patches/tools-xenmon-install.diff | 25 -- debian/patches/tools-xenmon-prefix.diff | 37 --- debian/patches/tools-xenpaging-prefix.diff | 23 -- debian/patches/tools-xenpmd-prefix.diff | 25 -- debian/patches/tools-xenstat-abiname.diff | 66 ----- debian/patches/tools-xenstat-prefix.diff | 62 ----- .../patches/tools-xenstore-compatibility.diff | 62 ----- debian/patches/tools-xenstore-prefix.diff | 53 ---- debian/patches/tools-xentrace-prefix.diff | 41 --- debian/patches/version.diff | 167 ------------- 36 files changed, 2383 deletions(-) delete mode 100644 debian/patches/CVE-2015-7812.diff delete mode 100644 debian/patches/CVE-2015-7813.diff delete mode 100644 debian/patches/CVE-2015-7814.diff delete mode 100644 debian/patches/CVE-2015-7835.diff delete mode 100644 debian/patches/CVE-2015-7969.1.diff delete mode 100644 debian/patches/CVE-2015-7969.diff delete mode 100644 debian/patches/CVE-2015-7970.diff delete mode 100644 debian/patches/CVE-2015-7971.diff delete mode 100644 debian/patches/CVE-2015-7972.diff delete mode 100644 debian/patches/config-prefix.diff delete mode 100644 debian/patches/series delete mode 100644 debian/patches/tools-allow-configure-time-choice-of-libexec-subdire.patch delete mode 100644 debian/patches/tools-blktap2-prefix.diff delete mode 100644 debian/patches/tools-console-prefix.diff delete mode 100644 debian/patches/tools-include-install.diff delete mode 100644 debian/patches/tools-libfsimage-abiname.diff delete mode 100644 debian/patches/tools-libfsimage-prefix.diff delete mode 100644 debian/patches/tools-libxc-abiname.diff delete mode 100644 debian/patches/tools-libxl-abiname.diff delete mode 100644 debian/patches/tools-libxl-prefix.diff delete mode 100644 debian/patches/tools-misc-prefix.diff delete mode 100644 debian/patches/tools-pygrub-prefix.diff delete mode 100644 debian/patches/tools-pygrub-remove-static-solaris-support delete mode 100644 debian/patches/tools-python-prefix.diff delete mode 100644 debian/patches/tools-rpath.diff delete mode 100644 debian/patches/tools-xcutils-rpath.diff delete mode 100644 debian/patches/tools-xenmon-install.diff delete mode 100644 debian/patches/tools-xenmon-prefix.diff delete mode 100644 debian/patches/tools-xenpaging-prefix.diff delete mode 100644 debian/patches/tools-xenpmd-prefix.diff delete mode 100644 debian/patches/tools-xenstat-abiname.diff delete mode 100644 debian/patches/tools-xenstat-prefix.diff delete mode 100644 debian/patches/tools-xenstore-compatibility.diff delete mode 100644 debian/patches/tools-xenstore-prefix.diff delete mode 100644 debian/patches/tools-xentrace-prefix.diff delete mode 100644 debian/patches/version.diff diff --git a/debian/patches/CVE-2015-7812.diff b/debian/patches/CVE-2015-7812.diff deleted file mode 100644 index fe223816f6..0000000000 --- a/debian/patches/CVE-2015-7812.diff +++ /dev/null @@ -1,59 +0,0 @@ -From 1cb31904e7ff1e56db0996c91b05d3771cf55d6e Mon Sep 17 00:00:00 2001 -From: Julien Grall -Date: Thu, 29 Oct 2015 13:46:45 +0100 -Subject: arm: Support hypercall_create_continuation for multicall - -Multicall for ARM has been supported since commit f0dbdc6 "xen: arm: fully -implement multicall interface.". Although, if an hypercall in multicall -requires preemption, it will crash the host: - -(XEN) Xen BUG at domain.c:347 -(XEN) ----[ Xen-4.7-unstable arm64 debug=y Tainted: C ]---- -[...] -(XEN) Xen call trace: -(XEN) [<00000000002420cc>] hypercall_create_continuation+0x64/0x380 (PC) -(XEN) [<0000000000217274>] do_memory_op+0x1b00/0x2334 (LR) -(XEN) [<0000000000250d2c>] do_multicall_call+0x114/0x124 -(XEN) [<0000000000217ff0>] do_multicall+0x17c/0x23c -(XEN) [<000000000024f97c>] do_trap_hypercall+0x90/0x12c -(XEN) [<0000000000251ca8>] do_trap_hypervisor+0xd2c/0x1ba4 -(XEN) [<00000000002582cc>] guest_sync+0x88/0xb8 -(XEN) -(XEN) -(XEN) **************************************** -(XEN) Panic on CPU 5: -(XEN) Xen BUG at domain.c:347 -(XEN) **************************************** -(XEN) -(XEN) Manual reset required ('noreboot' specified) - -Looking to the code, the support of multicall looks valid to me, as we only -need to fill call.args[...]. So drop the BUG(); - -This is CVE-2015-7812 / XSA-145. - -Signed-off-by: Julien Grall -Acked-by: Ian Campbell -master commit: 29bcf64ce8bc0b1b7aacd00c8668f255c4f0686c -master date: 2015-10-29 13:31:10 +0100 - -(cherry picked from commit ea95ecb8bf30f83b52a079cdfc824a3ba6ffd4ef) - -Patch-Name: CVE-2015-7812.diff ---- - xen/arch/arm/domain.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c -index b2bfc7d..b9a4226 100644 ---- a/xen/arch/arm/domain.c -+++ b/xen/arch/arm/domain.c -@@ -344,8 +344,6 @@ unsigned long hypercall_create_continuation( - - if ( test_bit(_MCSF_in_multicall, &mcs->flags) ) - { -- BUG(); /* XXX multicalls not implemented yet. */ -- - __set_bit(_MCSF_call_preempted, &mcs->flags); - - for ( i = 0; *p != '\0'; i++ ) diff --git a/debian/patches/CVE-2015-7813.diff b/debian/patches/CVE-2015-7813.diff deleted file mode 100644 index 24246b6dd7..0000000000 --- a/debian/patches/CVE-2015-7813.diff +++ /dev/null @@ -1,55 +0,0 @@ -From a04e7be8a95c45ebbbb21dedbc27d54debd0dd1a Mon Sep 17 00:00:00 2001 -From: Ian Campbell -Date: Thu, 29 Oct 2015 13:47:10 +0100 -Subject: arm: rate-limit logging from unimplemented PHYSDEVOP and HVMOP. - -These are guest accessible and should therefore be rate-limited. -Moreover, include them only in debug builds. - -This is CVE-2015-7813 / XSA-146. - -Signed-off-by: Ian Campbell -Reviewed-by: Jan Beulich -master commit: 1c0e59ff15764e7b0c59282365974f5b8924ce83 -master date: 2015-10-29 13:33:38 +0100 - -(cherry picked from commit b18d995ca341d07a38fec04aa137e9ef85ee4dd0) - -Patch-Name: CVE-2015-7813.diff ---- - xen/arch/arm/hvm.c | 2 +- - xen/arch/arm/physdev.c | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c -index 471c4cd..5fd0753 100644 ---- a/xen/arch/arm/hvm.c -+++ b/xen/arch/arm/hvm.c -@@ -57,7 +57,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg) - - default: - { -- printk("%s: Bad HVM op %ld.\n", __func__, op); -+ gdprintk(XENLOG_DEBUG, "HVMOP op=%lu: not implemented\n", op); - rc = -ENOSYS; - break; - } -diff --git a/xen/arch/arm/physdev.c b/xen/arch/arm/physdev.c -index 61b4a18..27bbbda 100644 ---- a/xen/arch/arm/physdev.c -+++ b/xen/arch/arm/physdev.c -@@ -8,12 +8,13 @@ - #include - #include - #include -+#include - #include - - - int do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) - { -- printk("%s %d cmd=%d: not implemented yet\n", __func__, __LINE__, cmd); -+ gdprintk(XENLOG_DEBUG, "PHYSDEVOP cmd=%d: not implemented\n", cmd); - return -ENOSYS; - } - diff --git a/debian/patches/CVE-2015-7814.diff b/debian/patches/CVE-2015-7814.diff deleted file mode 100644 index 21f22d068c..0000000000 --- a/debian/patches/CVE-2015-7814.diff +++ /dev/null @@ -1,50 +0,0 @@ -From be3a93a1970b7e753cc9736d7c3e795fd8846b2b Mon Sep 17 00:00:00 2001 -From: Ian Campbell -Date: Thu, 29 Oct 2015 13:47:38 +0100 -Subject: arm: handle races between relinquish_memory and free_domheap_pages - -Primarily this means XENMEM_decrease_reservation from a toolstack -domain. - -Unlike x86 we have no requirement right now to queue such pages onto -a separate list, if we hit this race then the other code has already -fully accepted responsibility for freeing this page and therefore -there is no more for relinquish_memory to do. - -This is CVE-2015-7814 / XSA-147. - -Signed-off-by: Ian Campbell -Reviewed-by: Julien Grall -Reviewed-by: Jan Beulich -master commit: 1ef01396fdff88b1c3331a09ca5c69619b90f4ea -master date: 2015-10-29 13:34:17 +0100 - -(cherry picked from commit df6fa370865717ee51530c0102d1e983a70d37c3) - -Patch-Name: CVE-2015-7814.diff ---- - xen/arch/arm/domain.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c -index b9a4226..20cc772 100644 ---- a/xen/arch/arm/domain.c -+++ b/xen/arch/arm/domain.c -@@ -768,8 +768,15 @@ static int relinquish_memory(struct domain *d, struct page_list_head *list) - { - /* Grab a reference to the page so it won't disappear from under us. */ - if ( unlikely(!get_page(page, d)) ) -- /* Couldn't get a reference -- someone is freeing this page. */ -- BUG(); -+ /* -+ * Couldn't get a reference -- someone is freeing this page and -+ * has already committed to doing so, so no more to do here. -+ * -+ * Note that the page must be left on the list, a list_del -+ * here will clash with the list_del done by the other -+ * party in the race and corrupt the list head. -+ */ -+ continue; - - if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) - put_page(page); diff --git a/debian/patches/CVE-2015-7835.diff b/debian/patches/CVE-2015-7835.diff deleted file mode 100644 index 106f79b37c..0000000000 --- a/debian/patches/CVE-2015-7835.diff +++ /dev/null @@ -1,57 +0,0 @@ -From e7a7fad12aef53df7e8c1188fec3644deb04da95 Mon Sep 17 00:00:00 2001 -From: Jan Beulich -Date: Thu, 29 Oct 2015 13:48:09 +0100 -Subject: x86: guard against undue super page PTE creation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When optional super page support got added (commit bd1cd81d64 "x86: PV -support for hugepages"), two adjustments were missed: mod_l2_entry() -needs to consider the PSE and RW bits when deciding whether to use the -fast path, and the PSE bit must not be removed from L2_DISALLOW_MASK -unconditionally. - -This is CVE-2015-7835 / XSA-148. - -Reported-by: "栾尚聪(好风)" -Signed-off-by: Jan Beulich -Reviewed-by: Tim Deegan -master commit: fe360c90ea13f309ef78810f1a2b92f2ae3b30b8 -master date: 2015-10-29 13:35:07 +0100 - -(cherry picked from commit 2d094bd87072e26ac29b07917d31fcbf13892288) - -Patch-Name: CVE-2015-7835.diff ---- - xen/arch/x86/mm.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c -index 202ff76..fc65982 100644 ---- a/xen/arch/x86/mm.c -+++ b/xen/arch/x86/mm.c -@@ -160,7 +160,10 @@ static void put_superpage(unsigned long mfn); - static uint32_t base_disallow_mask; - /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */ - #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL) --#define L2_DISALLOW_MASK (base_disallow_mask & ~_PAGE_PSE) -+ -+#define L2_DISALLOW_MASK (unlikely(opt_allow_superpage) \ -+ ? base_disallow_mask & ~_PAGE_PSE \ -+ : base_disallow_mask) - - #define l3_disallow_mask(d) (!is_pv_32bit_domain(d) ? \ - base_disallow_mask : 0xFFFFF198U) -@@ -1839,7 +1842,10 @@ static int mod_l2_entry(l2_pgentry_t *pl2e, - } - - /* Fast path for identical mapping and presence. */ -- if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT) ) -+ if ( !l2e_has_changed(ol2e, nl2e, -+ unlikely(opt_allow_superpage) -+ ? _PAGE_PSE | _PAGE_RW | _PAGE_PRESENT -+ : _PAGE_PRESENT) ) - { - adjust_guest_l2e(nl2e, d); - if ( UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, vcpu, preserve_ad) ) diff --git a/debian/patches/CVE-2015-7969.1.diff b/debian/patches/CVE-2015-7969.1.diff deleted file mode 100644 index 5945fc161a..0000000000 --- a/debian/patches/CVE-2015-7969.1.diff +++ /dev/null @@ -1,42 +0,0 @@ -From a0b5a0f9489298581a06a5bc183777cee3a408af Mon Sep 17 00:00:00 2001 -From: Jan Beulich -Date: Thu, 29 Oct 2015 13:51:24 +0100 -Subject: xenoprof: free domain's vcpu array - -This was overlooked in fb442e2171 ("x86_64: allow more vCPU-s per -guest"). - -This is CVE-2015-7969 / XSA-151. - -Signed-off-by: Jan Beulich -Reviewed-by: Ian Campbell -master commit: 6e97c4b37386c2d09e09e9b5d5d232e37728b960 -master date: 2015-10-29 13:36:52 +0100 - -(cherry picked from commit 429f0cd270851462783fc6d56d6bae9cbb40bdca) - -Patch-Name: CVE-2015-7969.1.diff ---- - xen/common/xenoprof.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c -index 1061323..53a803a 100644 ---- a/xen/common/xenoprof.c -+++ b/xen/common/xenoprof.c -@@ -239,6 +239,7 @@ static int alloc_xenoprof_struct( - d->xenoprof->rawbuf = alloc_xenheap_pages(get_order_from_pages(npages), 0); - if ( d->xenoprof->rawbuf == NULL ) - { -+ xfree(d->xenoprof->vcpu); - xfree(d->xenoprof); - d->xenoprof = NULL; - return -ENOMEM; -@@ -286,6 +287,7 @@ void free_xenoprof_pages(struct domain *d) - free_xenheap_pages(x->rawbuf, order); - } - -+ xfree(x->vcpu); - xfree(x); - d->xenoprof = NULL; - } diff --git a/debian/patches/CVE-2015-7969.diff b/debian/patches/CVE-2015-7969.diff deleted file mode 100644 index 59af12b4e3..0000000000 --- a/debian/patches/CVE-2015-7969.diff +++ /dev/null @@ -1,35 +0,0 @@ -From 3013fbfe54dd378d88c01f8056a6c043208bf6d3 Mon Sep 17 00:00:00 2001 -From: Jan Beulich -Date: Thu, 29 Oct 2015 13:49:56 +0100 -Subject: free domain's vcpu array - -This was overlooked in fb442e2171 ("x86_64: allow more vCPU-s per -guest"). - -This is CVE-2015-7969 / XSA-149. - -Reported-by: Ian Campbell -Signed-off-by: Jan Beulich -Reviewed-by: Ian Campbell -master commit: d46896ebbb23f3a9fef2eb6066ae614fd1acfd96 -master date: 2015-10-29 13:35:40 +0100 - -(cherry picked from commit 2c57108c36eaa10885b7d0daad534348717e4f9d) - -Patch-Name: CVE-2015-7969.diff ---- - xen/common/domain.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/xen/common/domain.c b/xen/common/domain.c -index 1b9fcfc..796c492 100644 ---- a/xen/common/domain.c -+++ b/xen/common/domain.c -@@ -833,6 +833,7 @@ static void complete_domain_destroy(struct rcu_head *head) - - xsm_free_security_domain(d); - free_cpumask_var(d->domain_dirty_cpumask); -+ xfree(d->vcpu); - free_domain_struct(d); - - send_global_virq(VIRQ_DOM_EXC); diff --git a/debian/patches/CVE-2015-7970.diff b/debian/patches/CVE-2015-7970.diff deleted file mode 100644 index c488b30ae5..0000000000 --- a/debian/patches/CVE-2015-7970.diff +++ /dev/null @@ -1,221 +0,0 @@ -From 8f0e5e821940d5079eba34595bc897ac6b9ccd5c Mon Sep 17 00:00:00 2001 -From: Andrew Cooper -Date: Thu, 29 Oct 2015 13:50:59 +0100 -Subject: x86/PoD: Eager sweep for zeroed pages - -Based on the contents of a guests physical address space, -p2m_pod_emergency_sweep() could degrade into a linear memcmp() from 0 to -max_gfn, which runs non-preemptibly. - -As p2m_pod_emergency_sweep() runs behind the scenes in a number of contexts, -making it preemptible is not feasible. - -Instead, a different approach is taken. Recently-populated pages are eagerly -checked for reclaimation, which amortises the p2m_pod_emergency_sweep() -operation across each p2m_pod_demand_populate() operation. - -Note that in the case that a 2M superpage can't be reclaimed as a superpage, -it is shattered if 4K pages of zeros can be reclaimed. This is unfortunate -but matches the previous behaviour, and is required to avoid regressions -(domain crash from PoD exhaustion) with VMs configured close to the limit. - -This is CVE-2015-7970 / XSA-150. - -Signed-off-by: Andrew Cooper -Reviewed-by: Jan Beulich -Reviewed-by: George Dunlap -master commit: 101ce53266866144e724ed593173bc4098b300b9 -master date: 2015-10-29 13:36:25 +0100 - -(cherry picked from commit 4a32fbd95af6503ea1314ff2aa9a0b0a473d46c0) - -Patch-Name: CVE-2015-7970.diff ---- - xen/arch/x86/mm/p2m-pod.c | 86 +++++++++++++++++++++++++++++++---------------- - xen/arch/x86/mm/p2m.c | 4 +++ - xen/include/asm-x86/p2m.h | 18 +++++++--- - 3 files changed, 75 insertions(+), 33 deletions(-) - -diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c -index 8156525..9196a5d 100644 ---- a/xen/arch/x86/mm/p2m-pod.c -+++ b/xen/arch/x86/mm/p2m-pod.c -@@ -901,28 +901,6 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) - } - - #define POD_SWEEP_LIMIT 1024 -- --/* When populating a new superpage, look at recently populated superpages -- * hoping that they've been zeroed. This will snap up zeroed pages as soon as -- * the guest OS is done with them. */ --static void --p2m_pod_check_last_super(struct p2m_domain *p2m, unsigned long gfn_aligned) --{ -- unsigned long check_gfn; -- -- ASSERT(p2m->pod.last_populated_index < POD_HISTORY_MAX); -- -- check_gfn = p2m->pod.last_populated[p2m->pod.last_populated_index]; -- -- p2m->pod.last_populated[p2m->pod.last_populated_index] = gfn_aligned; -- -- p2m->pod.last_populated_index = -- ( p2m->pod.last_populated_index + 1 ) % POD_HISTORY_MAX; -- -- p2m_pod_zero_check_superpage(p2m, check_gfn); --} -- -- - #define POD_SWEEP_STRIDE 16 - static void - p2m_pod_emergency_sweep(struct p2m_domain *p2m) -@@ -963,7 +941,7 @@ p2m_pod_emergency_sweep(struct p2m_domain *p2m) - * NB that this is a zero-sum game; we're increasing our cache size - * by re-increasing our 'debt'. Since we hold the pod lock, - * (entry_count - count) must remain the same. */ -- if ( p2m->pod.count > 0 && i < limit ) -+ if ( i < limit && (p2m->pod.count > 0 || hypercall_preempt_check()) ) - break; - } - -@@ -975,6 +953,58 @@ p2m_pod_emergency_sweep(struct p2m_domain *p2m) - - } - -+static void pod_eager_reclaim(struct p2m_domain *p2m) -+{ -+ struct pod_mrp_list *mrp = &p2m->pod.mrp; -+ unsigned int i = 0; -+ -+ /* -+ * Always check one page for reclaimation. -+ * -+ * If the PoD pool is empty, keep checking some space is found, or all -+ * entries have been exhaused. -+ */ -+ do -+ { -+ unsigned int idx = (mrp->idx + i++) % ARRAY_SIZE(mrp->list); -+ unsigned long gfn = mrp->list[idx]; -+ -+ if ( gfn != INVALID_GFN ) -+ { -+ if ( gfn & POD_LAST_SUPERPAGE ) -+ { -+ gfn &= ~POD_LAST_SUPERPAGE; -+ -+ if ( p2m_pod_zero_check_superpage(p2m, gfn) == 0 ) -+ { -+ unsigned int x; -+ -+ for ( x = 0; x < SUPERPAGE_PAGES; ++x, ++gfn ) -+ p2m_pod_zero_check(p2m, &gfn, 1); -+ } -+ } -+ else -+ p2m_pod_zero_check(p2m, &gfn, 1); -+ -+ mrp->list[idx] = INVALID_GFN; -+ } -+ -+ } while ( (p2m->pod.count == 0) && (i < ARRAY_SIZE(mrp->list)) ); -+} -+ -+static void pod_eager_record(struct p2m_domain *p2m, -+ unsigned long gfn, unsigned int order) -+{ -+ struct pod_mrp_list *mrp = &p2m->pod.mrp; -+ -+ ASSERT(mrp->list[mrp->idx] == INVALID_GFN); -+ ASSERT(gfn != INVALID_GFN); -+ -+ mrp->list[mrp->idx++] = -+ gfn | (order == PAGE_ORDER_2M ? POD_LAST_SUPERPAGE : 0); -+ mrp->idx %= ARRAY_SIZE(mrp->list); -+} -+ - int - p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, - unsigned int order, -@@ -1015,6 +1045,8 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, - return 0; - } - -+ pod_eager_reclaim(p2m); -+ - /* Only sweep if we're actually out of memory. Doing anything else - * causes unnecessary time and fragmentation of superpages in the p2m. */ - if ( p2m->pod.count == 0 ) -@@ -1051,6 +1083,8 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, - p2m->pod.entry_count -= (1 << order); - BUG_ON(p2m->pod.entry_count < 0); - -+ pod_eager_record(p2m, gfn_aligned, order); -+ - if ( tb_init_done ) - { - struct { -@@ -1066,12 +1100,6 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, - __trace_var(TRC_MEM_POD_POPULATE, 0, sizeof(t), &t); - } - -- /* Check the last guest demand-populate */ -- if ( p2m->pod.entry_count > p2m->pod.count -- && (order == PAGE_ORDER_2M) -- && (q & P2M_ALLOC) ) -- p2m_pod_check_last_super(p2m, gfn_aligned); -- - pod_unlock(p2m); - return 0; - out_of_memory: -diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c -index c6b883d..cbe3f24 100644 ---- a/xen/arch/x86/mm/p2m.c -+++ b/xen/arch/x86/mm/p2m.c -@@ -60,6 +60,7 @@ boolean_param("hap_2mb", opt_hap_2mb); - /* Init the datastructures for later use by the p2m code */ - static int p2m_initialise(struct domain *d, struct p2m_domain *p2m) - { -+ unsigned int i; - int ret = 0; - - mm_rwlock_init(&p2m->lock); -@@ -75,6 +76,9 @@ static int p2m_initialise(struct domain *d, struct p2m_domain *p2m) - - p2m->np2m_base = P2M_BASE_EADDR; - -+ for ( i = 0; i < ARRAY_SIZE(p2m->pod.mrp.list); ++i ) -+ p2m->pod.mrp.list[i] = INVALID_GFN; -+ - if ( hap_enabled(d) && cpu_has_vmx ) - ret = ept_p2m_init(p2m); - else -diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h -index 5e99ac6..e91a875 100644 ---- a/xen/include/asm-x86/p2m.h -+++ b/xen/include/asm-x86/p2m.h -@@ -292,10 +292,20 @@ struct p2m_domain { - entry_count; /* # of pages in p2m marked pod */ - unsigned long reclaim_single; /* Last gpfn of a scan */ - unsigned long max_guest; /* gpfn of max guest demand-populate */ --#define POD_HISTORY_MAX 128 -- /* gpfn of last guest superpage demand-populated */ -- unsigned long last_populated[POD_HISTORY_MAX]; -- unsigned int last_populated_index; -+ -+ /* -+ * Tracking of the most recently populated PoD pages, for eager -+ * reclamation. -+ */ -+ struct pod_mrp_list { -+#define NR_POD_MRP_ENTRIES 32 -+ -+/* Encode ORDER_2M superpage in top bit of GFN */ -+#define POD_LAST_SUPERPAGE (INVALID_GFN & ~(INVALID_GFN >> 1)) -+ -+ unsigned long list[NR_POD_MRP_ENTRIES]; -+ unsigned int idx; -+ } mrp; - mm_lock_t lock; /* Locking of private pod structs, * - * not relying on the p2m lock. */ - } pod; diff --git a/debian/patches/CVE-2015-7971.diff b/debian/patches/CVE-2015-7971.diff deleted file mode 100644 index 1a681f003a..0000000000 --- a/debian/patches/CVE-2015-7971.diff +++ /dev/null @@ -1,83 +0,0 @@ -From d954b6092311355c95af67d981bdd2491b3df66e Mon Sep 17 00:00:00 2001 -From: Jan Beulich -Date: Thu, 29 Oct 2015 13:52:02 +0100 -Subject: x86: rate-limit logging in do_xen{oprof,pmu}_op() - -Some of the sub-ops are acessible to all guests, and hence should be -rate-limited. In the xenoprof case, just like for XSA-146, include them -only in debug builds. Since the vPMU code is rather new, allow them to -be always present, but downgrade them to (rate limited) guest messages. - -This is CVE-2015-7971 / XSA-152. - -Signed-off-by: Jan Beulich -Reviewed-by: Ian Campbell -master commit: 95e7415843b94c346e5ba8682665f508f220e04b -master date: 2015-10-29 13:37:19 +0100 - -(cherry picked from commit bdc9fdf9d468cb94ca0fbed1b969c20bf173dc9b) - -Patch-Name: CVE-2015-7971.diff ---- - xen/arch/x86/cpu/vpmu.c | 8 ++++---- - xen/common/xenoprof.c | 9 +++------ - 2 files changed, 7 insertions(+), 10 deletions(-) - -diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c -index 8af3df1..2f5156a 100644 ---- a/xen/arch/x86/cpu/vpmu.c -+++ b/xen/arch/x86/cpu/vpmu.c -@@ -682,8 +682,8 @@ long do_xenpmu_op(unsigned int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) - vpmu_mode = pmu_params.val; - else if ( vpmu_mode != pmu_params.val ) - { -- printk(XENLOG_WARNING -- "VPMU: Cannot change mode while active VPMUs exist\n"); -+ gprintk(XENLOG_WARNING, -+ "VPMU: Cannot change mode while active VPMUs exist\n"); - ret = -EBUSY; - } - -@@ -714,8 +714,8 @@ long do_xenpmu_op(unsigned int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) - vpmu_features = pmu_params.val; - else - { -- printk(XENLOG_WARNING "VPMU: Cannot change features while" -- " active VPMUs exist\n"); -+ gprintk(XENLOG_WARNING, -+ "VPMU: Cannot change features while active VPMUs exist\n"); - ret = -EBUSY; - } - -diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c -index 53a803a..19b4605 100644 ---- a/xen/common/xenoprof.c -+++ b/xen/common/xenoprof.c -@@ -676,15 +676,13 @@ ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg) - - if ( (op < 0) || (op > XENOPROF_last_op) ) - { -- printk("xenoprof: invalid operation %d for domain %d\n", -- op, current->domain->domain_id); -+ gdprintk(XENLOG_DEBUG, "invalid operation %d\n", op); - return -EINVAL; - } - - if ( !NONPRIV_OP(op) && (current->domain != xenoprof_primary_profiler) ) - { -- printk("xenoprof: dom %d denied privileged operation %d\n", -- current->domain->domain_id, op); -+ gdprintk(XENLOG_DEBUG, "denied privileged operation %d\n", op); - return -EPERM; - } - -@@ -907,8 +905,7 @@ ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg) - spin_unlock(&xenoprof_lock); - - if ( ret < 0 ) -- printk("xenoprof: operation %d failed for dom %d (status : %d)\n", -- op, current->domain->domain_id, ret); -+ gdprintk(XENLOG_DEBUG, "operation %d failed: %d\n", op, ret); - - return ret; - } diff --git a/debian/patches/CVE-2015-7972.diff b/debian/patches/CVE-2015-7972.diff deleted file mode 100644 index a2a8587c16..0000000000 --- a/debian/patches/CVE-2015-7972.diff +++ /dev/null @@ -1,86 +0,0 @@ -From bfef8af1dbdd3e12537a7379f057b35d006e0145 Mon Sep 17 00:00:00 2001 -From: Ian Jackson -Date: Wed, 21 Oct 2015 16:18:30 +0100 -Subject: libxl: adjust PoD target by memory fudge, too - -PoD guests need to balloon at least as far as required by PoD, or risk -crashing. Currently they don't necessarily know what the right value -is, because our memory accounting is (at the very least) confusing. - -Apply the memory limit fudge factor to the in-hypervisor PoD memory -target, too. This will increase the size of the guest's PoD cache by -the fudge factor LIBXL_MAXMEM_CONSTANT (currently 1Mby). This ensures -that even with a slightly-off balloon driver, the guest will be -stable even under memory pressure. - -There are two call sites of xc_domain_set_pod_target that need fixing: - -The one in libxl_set_memory_target is straightforward. - -The one in xc_hvm_build_x86.c:setup_guest is more awkward. Simply -setting the PoD target differently does not work because the various -amounts of memory during domain construction no longer match up. -Instead, we adjust the guest memory target in xenstore (but only for -PoD guests). - -This introduces a 1Mby discrepancy between the balloon target of a PoD -guest at boot, and the target set by an apparently-equivalent `xl -mem-set' (or similar) later. This approach is low-risk for a security -fix but we need to fix this up properly in xen.git#staging and -probably also in stable trees. - -This is XSA-153. - -Signed-off-by: Ian Jackson -(cherry picked from commit 56fb5fd62320eb40a7517206f9706aa9188d6f7b) - -Patch-Name: CVE-2015-7972.diff ---- - tools/libxl/libxl.c | 2 +- - tools/libxl/libxl_dom.c | 9 ++++++++- - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c -index d38d0c7..1366177 100644 ---- a/tools/libxl/libxl.c -+++ b/tools/libxl/libxl.c -@@ -4815,7 +4815,7 @@ retry_transaction: - } - - rc = xc_domain_set_pod_target(ctx->xch, domid, -- new_target_memkb / 4, NULL, NULL, NULL); -+ (new_target_memkb + LIBXL_MAXMEM_CONSTANT) / 4, NULL, NULL, NULL); - if (rc != 0) { - LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, - "xc_domain_set_pod_target domid=%d, memkb=%d " -diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c -index b514377..8019f4e 100644 ---- a/tools/libxl/libxl_dom.c -+++ b/tools/libxl/libxl_dom.c -@@ -486,6 +486,7 @@ int libxl__build_post(libxl__gc *gc, uint32_t domid, - xs_transaction_t t; - char **ents; - int i, rc; -+ int64_t mem_target_fudge; - - if (info->num_vnuma_nodes && !info->num_vcpu_soft_affinity) { - rc = set_vnuma_affinity(gc, domid, info); -@@ -518,11 +519,17 @@ int libxl__build_post(libxl__gc *gc, uint32_t domid, - } - } - -+ mem_target_fudge = -+ (info->type == LIBXL_DOMAIN_TYPE_HVM && -+ info->max_memkb > info->target_memkb) -+ ? LIBXL_MAXMEM_CONSTANT : 0; -+ - ents = libxl__calloc(gc, 12 + (info->max_vcpus * 2) + 2, sizeof(char *)); - ents[0] = "memory/static-max"; - ents[1] = GCSPRINTF("%"PRId64, info->max_memkb); - ents[2] = "memory/target"; -- ents[3] = GCSPRINTF("%"PRId64, info->target_memkb - info->video_memkb); -+ ents[3] = GCSPRINTF("%"PRId64, info->target_memkb - info->video_memkb -+ - mem_target_fudge); - ents[4] = "memory/videoram"; - ents[5] = GCSPRINTF("%"PRId64, info->video_memkb); - ents[6] = "domid"; diff --git a/debian/patches/config-prefix.diff b/debian/patches/config-prefix.diff deleted file mode 100644 index 88ac3961f1..0000000000 --- a/debian/patches/config-prefix.diff +++ /dev/null @@ -1,36 +0,0 @@ -From 31f71ac1ceed8aa294479cd74c17524300a3b84e Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:45 +0200 -Subject: config-prefix.diff - -Patch-Name: config-prefix.diff ---- - Config.mk | 2 +- - config/Paths.mk.in | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Config.mk b/Config.mk -index 54fbb9d..675bc18 100644 ---- a/Config.mk -+++ b/Config.mk -@@ -75,7 +75,7 @@ EXTRA_LIB += $(EXTRA_PREFIX)/lib - endif - - PYTHON ?= python --PYTHON_PREFIX_ARG ?= --prefix="$(prefix)" -+PYTHON_PREFIX_ARG ?= --home="$(LIBEXEC)" - # The above requires that prefix contains *no spaces*. This variable is here - # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug: - # https://bugs.launchpad.net/ubuntu/+bug/362570 -diff --git a/config/Paths.mk.in b/config/Paths.mk.in -index 1c7afb4..848d243 100644 ---- a/config/Paths.mk.in -+++ b/config/Paths.mk.in -@@ -13,6 +13,7 @@ - # http://wiki.xen.org/wiki/Category:Host_Configuration#System_wide_xen_configuration - - PACKAGE_TARNAME := @PACKAGE_TARNAME@ -+PACKAGE_VERSION := @PACKAGE_VERSION@ - prefix := @prefix@ - bindir := @bindir@ - sbindir := @sbindir@ diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 3af3d7741f..0000000000 --- a/debian/patches/series +++ /dev/null @@ -1,35 +0,0 @@ -version.diff -tools-allow-configure-time-choice-of-libexec-subdire.patch -config-prefix.diff -tools-libfsimage-abiname.diff -tools-libxc-abiname.diff -tools-libxl-abiname.diff -tools-xenstat-abiname.diff -tools-rpath.diff -tools-blktap2-prefix.diff -tools-console-prefix.diff -tools-libfsimage-prefix.diff -tools-libxl-prefix.diff -tools-misc-prefix.diff -tools-pygrub-prefix.diff -tools-python-prefix.diff -tools-xcutils-rpath.diff -tools-xenmon-prefix.diff -tools-xenpaging-prefix.diff -tools-xenpmd-prefix.diff -tools-xenstat-prefix.diff -tools-xenstore-prefix.diff -tools-xentrace-prefix.diff -tools-pygrub-remove-static-solaris-support -tools-include-install.diff -tools-xenmon-install.diff -tools-xenstore-compatibility.diff -CVE-2015-7812.diff -CVE-2015-7813.diff -CVE-2015-7814.diff -CVE-2015-7835.diff -CVE-2015-7969.diff -CVE-2015-7970.diff -CVE-2015-7969.1.diff -CVE-2015-7971.diff -CVE-2015-7972.diff diff --git a/debian/patches/tools-allow-configure-time-choice-of-libexec-subdire.patch b/debian/patches/tools-allow-configure-time-choice-of-libexec-subdire.patch deleted file mode 100644 index a2a73144ed..0000000000 --- a/debian/patches/tools-allow-configure-time-choice-of-libexec-subdire.patch +++ /dev/null @@ -1,233 +0,0 @@ -From 493bf6ef4a8669b2dc53d7603de544135ad81b33 Mon Sep 17 00:00:00 2001 -From: Ian Campbell -Date: Wed, 16 Dec 2015 15:06:35 +0000 -Subject: tools: allow configure time choice of libexec subdirectory. - -Currently we hardcode various paths such as $libexec/xen/{bin,boot}, -however some downstreams (notably Debian) would like instead to -install things into $libexec/xen-X.Y/{bin,boot} as part of allowing -multiple versions of the tools packages to be installed. - -Since this currently involves patching configure its a bit fiddly, -provide a configure option for the leaf dir instead, name it ---with-libexec-leaf-dir similar to the existing ---with-sysconfig-leaf-dir. - -Rather than have the determination of the full path in both configure -and config/Paths.mk.in move it into configure only. Also for -consistency move the other LIBEXEC_* to configure, even though they -are only substituted into Paths.mk. - -Signed-off-by: Ian Campbell -Reviewed-by: Doug Goldstein -Acked-by: Ian Jackson -Cc: 805508@bugs.debian.org -[ ijc -- removed stray ` ] - -(cherry picked from commit de858271c16851d662b2613699401df6ecec8ef8) - -Patch-Name: tools-allow-configure-time-choice-of-libexec-subdire.patch ---- - config/Paths.mk.in | 6 +++--- - configure | 26 +++++++++++++++++++++++--- - m4/paths.m4 | 24 ++++++++++++++++++------ - tools/configure | 26 +++++++++++++++++++++++--- - 4 files changed, 67 insertions(+), 15 deletions(-) - -diff --git a/config/Paths.mk.in b/config/Paths.mk.in -index d36504f..1c7afb4 100644 ---- a/config/Paths.mk.in -+++ b/config/Paths.mk.in -@@ -29,10 +29,10 @@ includedir := @includedir@ - localstatedir := @localstatedir@ - sysconfdir := @sysconfdir@ - --LIBEXEC := $(libexecdir)/$(PACKAGE_TARNAME) -+LIBEXEC := @LIBEXEC@ - LIBEXEC_BIN := @LIBEXEC_BIN@ --LIBEXEC_LIB := $(LIBEXEC)/lib --LIBEXEC_INC := $(LIBEXEC)/include -+LIBEXEC_LIB := @LIBEXEC_LIB@ -+LIBEXEC_INC := @LIBEXEC_INC@ - - SHAREDIR := @SHAREDIR@ - MAN1DIR := $(mandir)/man1 -diff --git a/configure b/configure -index 80b27d6..5af40d6 100755 ---- a/configure -+++ b/configure -@@ -606,7 +606,10 @@ XEN_LIB_STORED - XEN_LOG_DIR - XEN_RUN_DIR - XENFIRMWAREDIR -+LIBEXEC_INC -+LIBEXEC_LIB - LIBEXEC_BIN -+LIBEXEC - CONFIG_LEAF_DIR - host_os - host_vendor -@@ -659,6 +662,7 @@ ac_user_opts=' - enable_option_checking - with_initddir - with_sysconfig_leaf_dir -+with_libexec_leaf_dir - with_xen_dumpdir - enable_xen - enable_tools -@@ -1299,6 +1303,8 @@ Optional Packages: - options for runlevel scripts and daemons such as - xenstored. This should be either "sysconfig" or - "default". [sysconfig] -+ --with-libexec-leaf-dir=SUBDIR -+ Name of subdirectory in libexecdir to use. - --with-xen-dumpdir=DIR Path to directory for domU crash dumps. - [LOCALSTATEDIR/lib/xen/dump] - -@@ -1924,6 +1930,15 @@ CONFIG_LEAF_DIR=$config_leaf_dir - - - -+# Check whether --with-libexec-leaf-dir was given. -+if test "${with_libexec_leaf_dir+set}" = set; then : -+ withval=$with_libexec_leaf_dir; libexec_subdir=$withval -+else -+ libexec_subdir=$PACKAGE_TARNAME -+fi -+ -+ -+ - # Check whether --with-xen-dumpdir was given. - if test "${with_xen_dumpdir+set}" = set; then : - withval=$with_xen_dumpdir; xen_dumpdir_path=$withval -@@ -1940,11 +1955,16 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then - ;; - esac - fi --libexecdir=`eval echo $libexecdir` --LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin` -+LIBEXEC=`eval echo $libexecdir/$libexec_subdir` -+ -+ -+LIBEXEC_BIN=${LIBEXEC}/bin -+ -+LIBEXEC_LIB=${LIBEXEC}/lib - -+LIBEXEC_INC=${LIBEXEC}/include - --XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` -+XENFIRMWAREDIR=${LIBEXEC}/boot - - - XEN_RUN_DIR=$localstatedir/run/xen -diff --git a/m4/paths.m4 b/m4/paths.m4 -index 63e0f6b..fa902bb 100644 ---- a/m4/paths.m4 -+++ b/m4/paths.m4 -@@ -62,6 +62,14 @@ AC_ARG_WITH([sysconfig-leaf-dir], - CONFIG_LEAF_DIR=$config_leaf_dir - AC_SUBST(CONFIG_LEAF_DIR) - -+dnl autoconf docs suggest to use a "package name" subdir. We make it -+dnl configurable for the benefit of those who want e.g. xen-X.Y instead. -+AC_ARG_WITH([libexec-leaf-dir], -+ AS_HELP_STRING([--with-libexec-leaf-dir=SUBDIR], -+ [Name of subdirectory in libexecdir to use.]), -+ [libexec_subdir=$withval], -+ [libexec_subdir=$PACKAGE_TARNAME]) -+ - AC_ARG_WITH([xen-dumpdir], - AS_HELP_STRING([--with-xen-dumpdir=DIR], - [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]), -@@ -77,13 +85,17 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then - esac - fi - dnl expand exec_prefix or it will endup in substituted variables --libexecdir=`eval echo $libexecdir` --dnl autoconf doc suggest to use a "package name" subdir --dnl This variable will be substituted in various .in files --LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin` --AC_SUBST(LIBEXEC_BIN) -+LIBEXEC=`eval echo $libexecdir/$libexec_subdir` -+AC_SUBST(LIBEXEC) - --XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` -+dnl These variables will be substituted in various .in files -+LIBEXEC_BIN=${LIBEXEC}/bin -+AC_SUBST(LIBEXEC_BIN) -+LIBEXEC_LIB=${LIBEXEC}/lib -+AC_SUBST(LIBEXEC_LIB) -+LIBEXEC_INC=${LIBEXEC}/include -+AC_SUBST(LIBEXEC_INC) -+XENFIRMWAREDIR=${LIBEXEC}/boot - AC_SUBST(XENFIRMWAREDIR) - - XEN_RUN_DIR=$localstatedir/run/xen -diff --git a/tools/configure b/tools/configure -index aa66876..c04b38a 100755 ---- a/tools/configure -+++ b/tools/configure -@@ -726,7 +726,10 @@ XEN_LIB_STORED - XEN_LOG_DIR - XEN_RUN_DIR - XENFIRMWAREDIR -+LIBEXEC_INC -+LIBEXEC_LIB - LIBEXEC_BIN -+LIBEXEC - CONFIG_LEAF_DIR - FILE_OFFSET_BITS - OBJEXT -@@ -789,6 +792,7 @@ enable_option_checking - enable_largefile - with_initddir - with_sysconfig_leaf_dir -+with_libexec_leaf_dir - with_xen_dumpdir - enable_rpath - enable_githttp -@@ -1490,6 +1494,8 @@ Optional Packages: - options for runlevel scripts and daemons such as - xenstored. This should be either "sysconfig" or - "default". [sysconfig] -+ --with-libexec-leaf-dir=SUBDIR -+ Name of subdirectory in libexecdir to use. - --with-xen-dumpdir=DIR Path to directory for domU crash dumps. - [LOCALSTATEDIR/lib/xen/dump] - --with-linux-backend-modules="mod1 mod2" -@@ -3887,6 +3893,15 @@ CONFIG_LEAF_DIR=$config_leaf_dir - - - -+# Check whether --with-libexec-leaf-dir was given. -+if test "${with_libexec_leaf_dir+set}" = set; then : -+ withval=$with_libexec_leaf_dir; libexec_subdir=$withval -+else -+ libexec_subdir=$PACKAGE_TARNAME -+fi -+ -+ -+ - # Check whether --with-xen-dumpdir was given. - if test "${with_xen_dumpdir+set}" = set; then : - withval=$with_xen_dumpdir; xen_dumpdir_path=$withval -@@ -3903,11 +3918,16 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then - ;; - esac - fi --libexecdir=`eval echo $libexecdir` --LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin` -+LIBEXEC=`eval echo $libexecdir/$libexec_subdir` -+ -+ -+LIBEXEC_BIN=${LIBEXEC}/bin -+ -+LIBEXEC_LIB=${LIBEXEC}/lib - -+LIBEXEC_INC=${LIBEXEC}/include - --XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` -+XENFIRMWAREDIR=${LIBEXEC}/boot - - - XEN_RUN_DIR=$localstatedir/run/xen diff --git a/debian/patches/tools-blktap2-prefix.diff b/debian/patches/tools-blktap2-prefix.diff deleted file mode 100644 index 6b61843999..0000000000 --- a/debian/patches/tools-blktap2-prefix.diff +++ /dev/null @@ -1,154 +0,0 @@ -From 0217d57bce9dee21cd4b42319ecb734d7c508f29 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:53 +0200 -Subject: tools-blktap2-prefix.diff - -Patch-Name: tools-blktap2-prefix.diff ---- - tools/blktap2/control/Makefile | 26 ++++++++------------------ - tools/blktap2/vhd/Makefile | 1 + - tools/blktap2/vhd/lib/Makefile | 29 +++++++++-------------------- - 3 files changed, 18 insertions(+), 38 deletions(-) - -diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile -index 767f52a..c09ed65 100644 ---- a/tools/blktap2/control/Makefile -+++ b/tools/blktap2/control/Makefile -@@ -1,10 +1,7 @@ - XEN_ROOT := $(CURDIR)/../../../ - include $(XEN_ROOT)/tools/Rules.mk - --MAJOR = 1.0 --MINOR = 0 - LIBNAME = libblktapctl --LIBSONAME = $(LIBNAME).so.$(MAJOR) - - IBIN = tap-ctl - -@@ -38,39 +35,32 @@ OBJS = $(CTL_OBJS) tap-ctl.o - PICS = $(CTL_PICS) - - LIB_STATIC = $(LIBNAME).a --LIB_SHARED = $(LIBSONAME).$(MINOR) -+LIB_SHARED = $(LIBNAME).so - IBIN = tap-ctl - - all: build - - build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED) - --$(LIBNAME).so: $(LIBSONAME) -- ln -sf $< $@ -- --$(LIBSONAME): $(LIB_SHARED) -- ln -sf $< $@ -- - tap-ctl: tap-ctl.o $(LIBNAME).so -- $(CC) $(LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS) -+ $(CC) $(LDFLAGS) $(call LDFLAGS_RPATH,../lib) -o $@ $^ $(APPEND_LDFLAGS) - - $(LIB_STATIC): $(CTL_OBJS) - $(AR) r $@ $^ - - $(LIB_SHARED): $(CTL_PICS) -- $(CC) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ $(APPEND_LDFLAGS) -+ $(CC) $(LDFLAGS) -fPIC $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ $(APPEND_LDFLAGS) - - install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED) -- $(INSTALL_DIR) -p $(DESTDIR)$(sbindir) -- $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir) -+ $(INSTALL_DIR) -p $(DESTDIR)$(libdir) -+ $(INSTALL_DIR) -p $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_DIR) -p $(DESTDIR)$(LIBEXEC_LIB) -+ $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(libdir) -- $(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(libdir) -- ln -sf $(LIBSONAME) $(DESTDIR)$(libdir)/$(LIBNAME).so -- ln -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIBSONAME) -+ $(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBEXEC_LIB) - - clean: - rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED) -- rm -f $(LIBNAME).so $(LIBSONAME) - rm -f *~ - - distclean: clean -diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile -index fabd665..9802805 100644 ---- a/tools/blktap2/vhd/Makefile -+++ b/tools/blktap2/vhd/Makefile -@@ -12,6 +12,7 @@ CFLAGS += -Werror - CFLAGS += -Wno-unused - CFLAGS += -I../include - CFLAGS += -D_GNU_SOURCE -+CFLAGS += $(CFLAGS_libxenctrl) - - ifeq ($(CONFIG_X86_64),y) - CFLAGS += -fPIC -diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile -index ab2d648..bd6501d 100644 ---- a/tools/blktap2/vhd/lib/Makefile -+++ b/tools/blktap2/vhd/lib/Makefile -@@ -2,25 +2,19 @@ XEN_ROOT=$(CURDIR)/../../../.. - BLKTAP_ROOT := ../.. - include $(XEN_ROOT)/tools/Rules.mk - --LIBVHD-MAJOR = 1.0 --LIBVHD-MINOR = 0 --LIBVHD-SONAME = libvhd.so.$(LIBVHD-MAJOR) -- - LVM-UTIL-OBJ := $(BLKTAP_ROOT)/lvm/lvm-util.o - --LIBVHD-BUILD := libvhd.a -- --INST-DIR = $(libdir) -- - CFLAGS += -Werror - CFLAGS += -Wno-unused - CFLAGS += -I../../include - CFLAGS += -D_GNU_SOURCE - CFLAGS += -fPIC -+CFLAGS += $(CFLAGS_libxenctrl) - - ifeq ($(CONFIG_Linux),y) - LIBS := -luuid - endif -+LDFLAGS += $(LDFLAGS_libxenctrl) $(call LDFLAGS_RPATH) - - ifeq ($(CONFIG_LIBICONV),y) - LIBS += -liconv -@@ -50,27 +44,22 @@ LIB-OBJS += $(LVM-UTIL-OBJ) - - LIB-PICOBJS = $(patsubst %.o,%.opic,$(LIB-OBJS)) - --LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) -+LIBVHD = libvhd.a libvhd.so - - all: build - --build: libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) -+build: libvhd.a libvhd.so - - libvhd.a: $(LIB-OBJS) - $(AR) rc $@ $^ - --libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR): $(LIB-PICOBJS) -- $(CC) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \ -- $(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS) -- ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR) -- ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so -+libvhd.so: $(LIB-PICOBJS) -+ $(CC) $(SHLIB_LDFLAGS) $(LDFLAGS) -o libvhd.so $^ $(LIBS) - - install: all -- $(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR) -- $(INSTALL_DATA) libvhd.a $(DESTDIR)$(INST-DIR) -- $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR) -- ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR) -- ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so -+ $(INSTALL_DIR) -p $(DESTDIR)$(libdir) -+ $(INSTALL_DATA) libvhd.a $(DESTDIR)$(libdir) -+ $(INSTALL_PROG) libvhd.so $(DESTDIR)$(libdir) - - clean: - rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD) diff --git a/debian/patches/tools-console-prefix.diff b/debian/patches/tools-console-prefix.diff deleted file mode 100644 index ef0d1619cc..0000000000 --- a/debian/patches/tools-console-prefix.diff +++ /dev/null @@ -1,33 +0,0 @@ -From 4a3eac9949ecbae3c0a57e079c150f026416babb Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:54 +0200 -Subject: tools-console-prefix.diff - -Patch-Name: tools-console-prefix.diff ---- - tools/console/Makefile | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/tools/console/Makefile b/tools/console/Makefile -index 77e8f29..8ce2987 100644 ---- a/tools/console/Makefile -+++ b/tools/console/Makefile -@@ -8,6 +8,7 @@ CFLAGS += $(CFLAGS_libxenstore) - LDLIBS += $(LDLIBS_libxenctrl) - LDLIBS += $(LDLIBS_libxenstore) - LDLIBS += $(SOCKET_LIBS) -+LDFLAGS += $(call LDFLAGS_RPATH,../lib) - - LDLIBS_xenconsoled += $(UTIL_LIBS) - LDLIBS_xenconsoled += -lrt -@@ -37,9 +38,7 @@ $(eval $(genpath-target)) - - .PHONY: install - install: $(BIN) -- $(INSTALL_DIR) $(DESTDIR)/$(sbindir) -- $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir) - $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -- $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PROG) xenconsole xenconsoled $(DESTDIR)$(LIBEXEC_BIN) - - -include $(DEPS) diff --git a/debian/patches/tools-include-install.diff b/debian/patches/tools-include-install.diff deleted file mode 100644 index 0a4aef7a5c..0000000000 --- a/debian/patches/tools-include-install.diff +++ /dev/null @@ -1,30 +0,0 @@ -From 6b4ea81f9dbec5687d0d24b2036545653857a280 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:30 +0200 -Subject: tools-include-install.diff - -Patch-Name: tools-include-install.diff ---- - tools/include/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tools/include/Makefile b/tools/include/Makefile -index dec8b3d..cdc8505 100644 ---- a/tools/include/Makefile -+++ b/tools/include/Makefile -@@ -14,7 +14,6 @@ xen-foreign: - xen/.dir: - @rm -rf xen - mkdir -p xen/libelf -- ln -sf $(XEN_ROOT)/xen/include/public/COPYING xen - ln -sf $(wildcard $(XEN_ROOT)/xen/include/public/*.h) xen - ln -sf $(addprefix $(XEN_ROOT)/xen/include/public/,arch-x86 arch-arm hvm io xsm) xen - ln -sf ../xen-sys/$(XEN_OS) xen/sys -@@ -42,7 +41,6 @@ install: all - $(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/io - $(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/sys - $(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/xsm -- $(INSTALL_DATA) xen/COPYING $(DESTDIR)$(includedir)/xen - $(INSTALL_DATA) xen/*.h $(DESTDIR)$(includedir)/xen - $(INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(includedir)/xen/arch-x86 - $(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(includedir)/xen/arch-x86/hvm diff --git a/debian/patches/tools-libfsimage-abiname.diff b/debian/patches/tools-libfsimage-abiname.diff deleted file mode 100644 index 422ad5a63a..0000000000 --- a/debian/patches/tools-libfsimage-abiname.diff +++ /dev/null @@ -1,60 +0,0 @@ -From f1a46665ec9eaa57a6f6a7e0478f38a837133c4a Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:47 +0200 -Subject: tools-libfsimage-abiname.diff - -Patch-Name: tools-libfsimage-abiname.diff ---- - tools/libfsimage/common/Makefile | 18 ++++-------------- - 1 file changed, 4 insertions(+), 14 deletions(-) - -diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile -index 4840bc2..8357b0a 100644 ---- a/tools/libfsimage/common/Makefile -+++ b/tools/libfsimage/common/Makefile -@@ -1,9 +1,6 @@ - XEN_ROOT = $(CURDIR)/../../.. - include $(XEN_ROOT)/tools/libfsimage/Rules.mk - --MAJOR = 1.0 --MINOR = 0 -- - LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS - LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU - LDFLAGS = $(LDFLAGS-y) -@@ -15,7 +12,7 @@ LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c - - PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) - --LIB = libfsimage.so libfsimage.so.$(MAJOR) libfsimage.so.$(MAJOR).$(MINOR) -+LIB = libfsimage.so - - .PHONY: all - all: $(LIB) -@@ -24,9 +21,7 @@ all: $(LIB) - install: all - $(INSTALL_DIR) $(DESTDIR)$(libdir) - $(INSTALL_DIR) $(DESTDIR)$(includedir) -- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) -- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libfsimage.so.$(MAJOR) -- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(libdir)/libfsimage.so -+ $(INSTALL_PROG) libfsimage.so $(DESTDIR)$(libdir) - $(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir) -@@ -34,13 +29,8 @@ install: all - clean distclean:: - rm -f $(LIB) - --libfsimage.so: libfsimage.so.$(MAJOR) -- ln -sf $< $@ --libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR) -- ln -sf $< $@ -- --libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS) -- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS) -+libfsimage.so: $(PIC_OBJS) -+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS) - - -include $(DEPS) - diff --git a/debian/patches/tools-libfsimage-prefix.diff b/debian/patches/tools-libfsimage-prefix.diff deleted file mode 100644 index fb9ee99835..0000000000 --- a/debian/patches/tools-libfsimage-prefix.diff +++ /dev/null @@ -1,53 +0,0 @@ -From bc0bf96348e2c683e2958453d837c45132671f96 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:55 +0200 -Subject: tools-libfsimage-prefix.diff - -Patch-Name: tools-libfsimage-prefix.diff ---- - tools/libfsimage/Rules.mk | 3 ++- - tools/libfsimage/common/Makefile | 6 ++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk -index a0c6504..3e35fc7 100644 ---- a/tools/libfsimage/Rules.mk -+++ b/tools/libfsimage/Rules.mk -@@ -3,10 +3,11 @@ include $(XEN_ROOT)/tools/Rules.mk - CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" - CFLAGS += -Werror -D_GNU_SOURCE - LDFLAGS += -L../common/ -+LDFLAGS += $(call LDFLAGS_RPATH,../..) - - PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) - --FSDIR = $(libdir)/fs -+FSDIR = $(LIBEXEC_LIB)/fs - - FSLIB = fsimage.so - -diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile -index 8357b0a..2043744 100644 ---- a/tools/libfsimage/common/Makefile -+++ b/tools/libfsimage/common/Makefile -@@ -1,6 +1,8 @@ - XEN_ROOT = $(CURDIR)/../../.. - include $(XEN_ROOT)/tools/libfsimage/Rules.mk - -+CFLAGS += -DFSDIR="\"$(LIBEXEC_LIB)/fs\"" -+ - LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS - LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU - LDFLAGS = $(LDFLAGS-y) -@@ -19,9 +21,9 @@ all: $(LIB) - - .PHONY: install - install: all -- $(INSTALL_DIR) $(DESTDIR)$(libdir) -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_LIB) - $(INSTALL_DIR) $(DESTDIR)$(includedir) -- $(INSTALL_PROG) libfsimage.so $(DESTDIR)$(libdir) -+ $(INSTALL_PROG) libfsimage.so $(DESTDIR)$(LIBEXEC_LIB) - $(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir) diff --git a/debian/patches/tools-libxc-abiname.diff b/debian/patches/tools-libxc-abiname.diff deleted file mode 100644 index 84fe4a30da..0000000000 --- a/debian/patches/tools-libxc-abiname.diff +++ /dev/null @@ -1,99 +0,0 @@ -From 99ff210087538225d22019474430cb0fdae8986a Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:48 +0200 -Subject: tools-libxc-abiname.diff - -Patch-Name: tools-libxc-abiname.diff ---- - tools/libxc/Makefile | 35 +++++++++++++---------------------- - 1 file changed, 13 insertions(+), 22 deletions(-) - -diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile -index a0f899b..8695ebf 100644 ---- a/tools/libxc/Makefile -+++ b/tools/libxc/Makefile -@@ -1,9 +1,6 @@ - XEN_ROOT = $(CURDIR)/../.. - include $(XEN_ROOT)/tools/Rules.mk - --MAJOR = 4.6 --MINOR = 0 -- - ifeq ($(CONFIG_LIBXC_MINIOS),y) - # Save/restore of a domain is currently incompatible with a stubdom environment - override CONFIG_MIGRATE := n -@@ -128,12 +125,12 @@ $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS) : CFLAGS += -include $(XEN_ - - LIB := libxenctrl.a - ifneq ($(nosharedlibs),y) --LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR) -+LIB += libxenctrl.so libxenctrl-$(PACKAGE_VERSION).so - endif - - LIB += libxenguest.a - ifneq ($(nosharedlibs),y) --LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR) -+LIB += libxenguest.so libxenguest-$(PACKAGE_VERSION).so - endif - - ifneq ($(nosharedlibs),y) -@@ -162,15 +159,13 @@ libs: $(LIB) - install: build - $(INSTALL_DIR) $(DESTDIR)$(libdir) - $(INSTALL_DIR) $(DESTDIR)$(includedir) -- $(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) -+ $(INSTALL_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir) -+ $(SYMLINK_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenctrl.so - $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir) -- $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR) -- $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so - $(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(includedir) -- $(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) -+ $(INSTALL_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir) -+ $(SYMLINK_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenguest.so - $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir) -- $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR) -- $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenguest.so - $(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir) - - .PHONY: TAGS -@@ -203,22 +198,18 @@ rpm: build - libxenctrl.a: $(CTRL_LIB_OBJS) - $(AR) rc $@ $^ - --libxenctrl.so: libxenctrl.so.$(MAJOR) -- $(SYMLINK_SHLIB) $< $@ --libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) -+libxenctrl.so: libxenctrl-$(PACKAGE_VERSION).so - $(SYMLINK_SHLIB) $< $@ - --libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) -- $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) -+libxenctrl-$(PACKAGE_VERSION).so: $(CTRL_PIC_OBJS) -+ $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) - - # libxenguest - - libxenguest.a: $(GUEST_LIB_OBJS) - $(AR) rc $@ $^ - --libxenguest.so: libxenguest.so.$(MAJOR) -- $(SYMLINK_SHLIB) $< $@ --libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR) -+libxenguest.so: libxenguest-$(PACKAGE_VERSION).so - $(SYMLINK_SHLIB) $< $@ - - ifeq ($(CONFIG_MiniOS),y) -@@ -230,9 +221,9 @@ endif - xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D) - xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D) - --libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l) --libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so -- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) -+libxenguest-$(PACKAGE_VERSION).so: COMPRESSION_LIBS = $(call zlib-options,l) -+libxenguest-$(PACKAGE_VERSION).so: $(GUEST_PIC_OBJS) libxenctrl-$(PACKAGE_VERSION).so -+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) - - xenctrl_osdep_ENOSYS.so: $(OSDEP_PIC_OBJS) libxenctrl.so - $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OSDEP_PIC_OBJS) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) diff --git a/debian/patches/tools-libxl-abiname.diff b/debian/patches/tools-libxl-abiname.diff deleted file mode 100644 index d1dc058fcb..0000000000 --- a/debian/patches/tools-libxl-abiname.diff +++ /dev/null @@ -1,80 +0,0 @@ -From 6b045729daf86c55440e0391bad4d981dbb2d805 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:49 +0200 -Subject: tools-libxl-abiname.diff - -Patch-Name: tools-libxl-abiname.diff ---- - tools/libxl/Makefile | 33 ++++++++++----------------------- - 1 file changed, 10 insertions(+), 23 deletions(-) - -diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile -index c5ecec1..08b2b93 100644 ---- a/tools/libxl/Makefile -+++ b/tools/libxl/Makefile -@@ -5,12 +5,6 @@ - XEN_ROOT = $(CURDIR)/../.. - include $(XEN_ROOT)/tools/Rules.mk - --MAJOR = 4.6 --MINOR = 0 -- --XLUMAJOR = 4.6 --XLUMINOR = 0 -- - CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ - -Wno-declaration-after-statement -Wformat-nonliteral - CFLAGS += -I. -fPIC -@@ -225,14 +219,11 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_ - $(call move-if-changed,__libxl_type$*_json.h,_libxl_type$*_json.h) - $(call move-if-changed,__libxl_type$*.c,_libxl_type$*.c) - --libxenlight.so: libxenlight.so.$(MAJOR) -+libxenlight.so: libxenlight-$(PACKAGE_VERSION).so - $(SYMLINK_SHLIB) $< $@ - --libxenlight.so.$(MAJOR): libxenlight.so.$(MAJOR).$(MINOR) -- $(SYMLINK_SHLIB) $< $@ -- --libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS) -- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) -+libxenlight-$(PACKAGE_VERSION).so: $(LIBXL_OBJS) -+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) - - libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS) - $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) -@@ -240,14 +231,11 @@ libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS) - libxenlight.a: $(LIBXL_OBJS) - $(AR) rcs libxenlight.a $^ - --libxlutil.so: libxlutil.so.$(XLUMAJOR) -- $(SYMLINK_SHLIB) $< $@ -- --libxlutil.so.$(XLUMAJOR): libxlutil.so.$(XLUMAJOR).$(XLUMINOR) -+libxlutil.so: libxlutil-$(PACKAGE_VERSION).so - $(SYMLINK_SHLIB) $< $@ - --libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS) libxenlight.so -- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxlutil.so.$(XLUMAJOR) $(SHLIB_LDFLAGS) -o $@ $(LIBXLU_OBJS) $(LIBXLU_LIBS) $(APPEND_LDFLAGS) -+libxlutil-$(PACKAGE_VERSION).so: $(LIBXLU_OBJS) libxenlight.so -+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $(LIBXLU_OBJS) $(LIBXLU_LIBS) $(APPEND_LDFLAGS) - - libxlutil.a: $(LIBXLU_OBJS) - $(AR) rcs libxlutil.a $^ -@@ -282,12 +270,11 @@ install: all - $(INSTALL_PROG) xl $(DESTDIR)$(sbindir) - $(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN) -- $(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) -- $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR) -- $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenlight.so -+ $(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir) -+ $(SYMLINK_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenlight.so - $(INSTALL_DATA) libxenlight.a $(DESTDIR)$(libdir) -- $(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir) -- $(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir)/libxlutil.so.$(XLUMAJOR) -+ $(INSTALL_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir) -+ $(SYMLINK_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxlutil.so - $(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(libdir)/libxlutil.so - $(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir) - $(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir) diff --git a/debian/patches/tools-libxl-prefix.diff b/debian/patches/tools-libxl-prefix.diff deleted file mode 100644 index a60f5d3ee0..0000000000 --- a/debian/patches/tools-libxl-prefix.diff +++ /dev/null @@ -1,56 +0,0 @@ -From d8e7fa4b74ebc68d38bca0ca5de82addbed7caff Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:57 +0200 -Subject: tools-libxl-prefix.diff - -Patch-Name: tools-libxl-prefix.diff ---- - tools/libxl/Makefile | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile -index 08b2b93..e756946 100644 ---- a/tools/libxl/Makefile -+++ b/tools/libxl/Makefile -@@ -12,6 +12,8 @@ CFLAGS += -I. -fPIC - ifeq ($(CONFIG_Linux),y) - LIBUUID_LIBS += -luuid - endif -+LDFLAGS_XL = $(call LDFLAGS_RPATH,../lib) -+LDFLAGS_LIBXL = $(call LDFLAGS_RPATH) - - LIBXL_LIBS = - LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS) -@@ -223,7 +225,7 @@ libxenlight.so: libxenlight-$(PACKAGE_VERSION).so - $(SYMLINK_SHLIB) $< $@ - - libxenlight-$(PACKAGE_VERSION).so: $(LIBXL_OBJS) -- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) -+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(LDFLAGS_LIBXL) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) - - libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS) - $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS) -@@ -241,7 +243,7 @@ libxlutil.a: $(LIBXLU_OBJS) - $(AR) rcs libxlutil.a $^ - - xl: $(XL_OBJS) libxlutil.so libxenlight.so -- $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) -lyajl $(APPEND_LDFLAGS) -+ $(CC) $(LDFLAGS) $(LDFLAGS_XL) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) -lyajl $(APPEND_LDFLAGS) - - xen-init-dom0: $(XEN_INIT_DOM0_OBJS) libxenlight.so - $(CC) $(LDFLAGS) -o $@ $(XEN_INIT_DOM0_OBJS) $(LDLIBS_libxenstore) $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) -@@ -261,13 +263,12 @@ $(PKG_CONFIG): % : %.in Makefile - - .PHONY: install - install: all -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) - $(INSTALL_DIR) $(DESTDIR)$(libdir) - $(INSTALL_DIR) $(DESTDIR)$(includedir) - $(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR) - $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig -- $(INSTALL_PROG) xl $(DESTDIR)$(sbindir) -+ $(INSTALL_PROG) xl $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir) diff --git a/debian/patches/tools-misc-prefix.diff b/debian/patches/tools-misc-prefix.diff deleted file mode 100644 index 5326f7e922..0000000000 --- a/debian/patches/tools-misc-prefix.diff +++ /dev/null @@ -1,28 +0,0 @@ -From 9bff27bcfcad2bcba7b428e7199173be9a7bb202 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:59 +0200 -Subject: tools-misc-prefix.diff - -Patch-Name: tools-misc-prefix.diff ---- - tools/misc/Makefile | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/tools/misc/Makefile b/tools/misc/Makefile -index c4490f3..650a150 100644 ---- a/tools/misc/Makefile -+++ b/tools/misc/Makefile -@@ -53,12 +53,8 @@ all build: $(TARGETS_BUILD) - - .PHONY: install - install: build -- $(INSTALL_DIR) $(DESTDIR)$(bindir) -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) - $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -- $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(bindir) -- $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(sbindir) -- $(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(INSTALL_SBIN) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN) - - .PHONY: clean - clean: diff --git a/debian/patches/tools-pygrub-prefix.diff b/debian/patches/tools-pygrub-prefix.diff deleted file mode 100644 index 543c1f7a30..0000000000 --- a/debian/patches/tools-pygrub-prefix.diff +++ /dev/null @@ -1,59 +0,0 @@ -From 1b9302af0618b30e918ecbafdb51d2badd3e666e Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:01 +0200 -Subject: tools-pygrub-prefix.diff - -Patch-Name: tools-pygrub-prefix.diff ---- - tools/pygrub/Makefile | 5 ----- - tools/pygrub/setup.py | 2 ++ - tools/pygrub/src/pygrub | 2 ++ - 3 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile -index fe8e03b..5d83907 100644 ---- a/tools/pygrub/Makefile -+++ b/tools/pygrub/Makefile -@@ -15,11 +15,6 @@ install: all - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \ - $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ - --install-scripts=$(LIBEXEC_BIN) --force -- set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ -- "`readlink -f $(DESTDIR)/$(bindir)`" != \ -- "`readlink -f $(LIBEXEC_BIN)`" ]; then \ -- ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \ -- fi - - .PHONY: clean - clean: -diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py -index 52dcf57..8a1be9a 100644 ---- a/tools/pygrub/setup.py -+++ b/tools/pygrub/setup.py -@@ -4,11 +4,13 @@ import os - import sys - - extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] -+extra_link_args = [ "-Wl,-rpath,${ORIGIN}/.." ] - - XEN_ROOT = "../.." - - fsimage = Extension("fsimage", - extra_compile_args = extra_compile_args, -+ extra_link_args = extra_link_args, - include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], - library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], - libraries = ["fsimage"], -diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub -index e4aedda..a50ed79 100755 ---- a/tools/pygrub/src/pygrub -+++ b/tools/pygrub/src/pygrub -@@ -21,6 +21,8 @@ import xen.lowlevel.xc - import curses, _curses, curses.wrapper, curses.textpad, curses.ascii - import getopt - -+sys.path.insert(1, sys.path[0] + '/../lib/python') -+ - import fsimage - import grub.GrubConf - import grub.LiloConf diff --git a/debian/patches/tools-pygrub-remove-static-solaris-support b/debian/patches/tools-pygrub-remove-static-solaris-support deleted file mode 100644 index d0b4d00e7c..0000000000 --- a/debian/patches/tools-pygrub-remove-static-solaris-support +++ /dev/null @@ -1,86 +0,0 @@ -From 21d1298418ec54f87a5dffe6857ab474b159d6dc Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:29 +0200 -Subject: Remove static solaris support from pygrub - -Patch-Name: tools-pygrub-remove-static-solaris-support ---- - tools/pygrub/src/pygrub | 51 +------------------------------------------------ - 1 file changed, 1 insertion(+), 50 deletions(-) - -diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub -index a50ed79..6204812 100755 ---- a/tools/pygrub/src/pygrub -+++ b/tools/pygrub/src/pygrub -@@ -16,7 +16,6 @@ import os, sys, string, struct, tempfile, re, traceback, stat, errno - import copy - import logging - import platform --import xen.lowlevel.xc - - import curses, _curses, curses.wrapper, curses.textpad, curses.ascii - import getopt -@@ -663,51 +662,6 @@ def run_grub(file, entry, fs, cfg_args): - - return grubcfg - --def supports64bitPVguest(): -- xc = xen.lowlevel.xc.xc() -- caps = xc.xeninfo()['xen_caps'].split(" ") -- for cap in caps: -- if cap == "xen-3.0-x86_64": -- return True -- return False -- --# If nothing has been specified, look for a Solaris domU. If found, perform the --# necessary tweaks. --def sniff_solaris(fs, cfg): -- if not fs.file_exists("/platform/i86xpv/kernel/unix") and \ -- not fs.file_exists("/platform/i86xpv/kernel/amd64/unix"): -- return cfg -- -- if not cfg["kernel"]: -- if supports64bitPVguest() and \ -- fs.file_exists("/platform/i86xpv/kernel/amd64/unix"): -- cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix" -- cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive" -- elif fs.file_exists("/platform/i86xpv/kernel/unix"): -- cfg["kernel"] = "/platform/i86xpv/kernel/unix" -- cfg["ramdisk"] = "/platform/i86pc/boot_archive" -- else: -- return cfg -- -- # Unpleasant. Typically we'll have 'root=foo -k' or 'root=foo /kernel -k', -- # and we need to maintain Xen properties (root= and ip=) and the kernel -- # before any user args. -- -- xenargs = "" -- userargs = "" -- -- if not cfg["args"]: -- cfg["args"] = cfg["kernel"] -- else: -- for arg in cfg["args"].split(): -- if re.match("^root=", arg) or re.match("^ip=", arg): -- xenargs += arg + " " -- elif arg != cfg["kernel"]: -- userargs += arg + " " -- cfg["args"] = xenargs + " " + cfg["kernel"] + " " + userargs -- -- return cfg -- - def sniff_netware(fs, cfg): - if not fs.file_exists("/nwserver/xnloader.sys"): - return cfg -@@ -893,10 +847,7 @@ if __name__ == "__main__": - try: - fs = fsimage.open(file, offset, bootfsoptions) - -- chosencfg = sniff_solaris(fs, incfg) -- -- if not chosencfg["kernel"]: -- chosencfg = sniff_netware(fs, incfg) -+ chosencfg = sniff_netware(fs, incfg) - - if not chosencfg["kernel"]: - chosencfg = run_grub(file, entry, fs, incfg["args"]) diff --git a/debian/patches/tools-python-prefix.diff b/debian/patches/tools-python-prefix.diff deleted file mode 100644 index c6a1a2bbb4..0000000000 --- a/debian/patches/tools-python-prefix.diff +++ /dev/null @@ -1,46 +0,0 @@ -From 141cd0567fbcf98572e37a220c0c85d0dffc9b2b Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:02 +0200 -Subject: tools-python-prefix.diff - -Patch-Name: tools-python-prefix.diff ---- - tools/python/setup.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/python/setup.py b/tools/python/setup.py -index 5bf81be..3439066 100644 ---- a/tools/python/setup.py -+++ b/tools/python/setup.py -@@ -5,6 +5,7 @@ import os, sys - XEN_ROOT = "../.." - - extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] -+extra_link_args = [ "-Wl,-rpath,${ORIGIN}/../../.." ] - - PATH_XEN = XEN_ROOT + "/tools/include" - PATH_LIBXC = XEN_ROOT + "/tools/libxc" -@@ -13,6 +14,7 @@ PATH_XENSTORE = XEN_ROOT + "/tools/xenstore" - - xc = Extension("xc", - extra_compile_args = extra_compile_args, -+ extra_link_args = extra_link_args, - include_dirs = [ PATH_XEN, PATH_LIBXC + "/include", "xen/lowlevel/xc" ], - library_dirs = [ PATH_LIBXC ], - libraries = [ "xenctrl", "xenguest" ], -@@ -21,6 +23,7 @@ xc = Extension("xc", - - xs = Extension("xs", - extra_compile_args = extra_compile_args, -+ extra_link_args = extra_link_args, - include_dirs = [ PATH_XEN, PATH_XENSTORE + "/include", "xen/lowlevel/xs" ], - library_dirs = [ PATH_XENSTORE ], - libraries = [ "xenstore" ], -@@ -29,6 +32,7 @@ xs = Extension("xs", - - xl = Extension("xl", - extra_compile_args = extra_compile_args, -+ extra_link_args = extra_link_args, - include_dirs = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC + "/include", "xen/lowlevel/xl" ], - library_dirs = [ PATH_LIBXL ], - libraries = [ "xenlight" ], diff --git a/debian/patches/tools-rpath.diff b/debian/patches/tools-rpath.diff deleted file mode 100644 index 98afbe181a..0000000000 --- a/debian/patches/tools-rpath.diff +++ /dev/null @@ -1,23 +0,0 @@ -From d84837538defa41229bbc4507b76869778cba9f1 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:51 +0200 -Subject: tools-rpath.diff - -Patch-Name: tools-rpath.diff ---- - tools/Rules.mk | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/Rules.mk b/tools/Rules.mk -index 2c422bd..8ea20a3 100644 ---- a/tools/Rules.mk -+++ b/tools/Rules.mk -@@ -9,6 +9,8 @@ include $(XEN_ROOT)/Config.mk - export _INSTALL := $(INSTALL) - INSTALL = $(XEN_ROOT)/tools/cross-install - -+LDFLAGS_RPATH = -Wl,-rpath,'$${ORIGIN}$(if $(1),/$(1))' -+ - XEN_INCLUDE = $(XEN_ROOT)/tools/include - XEN_LIBXC = $(XEN_ROOT)/tools/libxc - XEN_XENLIGHT = $(XEN_ROOT)/tools/libxl diff --git a/debian/patches/tools-xcutils-rpath.diff b/debian/patches/tools-xcutils-rpath.diff deleted file mode 100644 index 3949f41823..0000000000 --- a/debian/patches/tools-xcutils-rpath.diff +++ /dev/null @@ -1,23 +0,0 @@ -From 124316a08cf9154ce6809f61c5c56d1723364c82 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:05 +0200 -Subject: tools-xcutils-rpath.diff - -Patch-Name: tools-xcutils-rpath.diff ---- - tools/xcutils/Makefile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile -index fff519d..fb813b0 100644 ---- a/tools/xcutils/Makefile -+++ b/tools/xcutils/Makefile -@@ -19,6 +19,8 @@ CFLAGS += -Werror - CFLAGS_readnotes.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) -I$(XEN_ROOT)/tools/libxc - CFLAGS_lsevtchn.o := $(CFLAGS_libxenctrl) - -+APPEND_LDFLAGS += $(call LDFLAGS_RPATH,../lib) -+ - .PHONY: all - all: build - diff --git a/debian/patches/tools-xenmon-install.diff b/debian/patches/tools-xenmon-install.diff deleted file mode 100644 index 982939c418..0000000000 --- a/debian/patches/tools-xenmon-install.diff +++ /dev/null @@ -1,25 +0,0 @@ -From 1e891d48238987a735c7183a45822f68bcd00a56 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:31 +0200 -Subject: tools-xenmon-install.diff - -Patch-Name: tools-xenmon-install.diff ---- - tools/xenmon/Makefile | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile -index cb6d7f8..3eb4fc9 100644 ---- a/tools/xenmon/Makefile -+++ b/tools/xenmon/Makefile -@@ -13,6 +13,10 @@ - XEN_ROOT=$(CURDIR)/../.. - include $(XEN_ROOT)/tools/Rules.mk - -+DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path) -+PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH) -+INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG) -+ - CFLAGS += -Werror - CFLAGS += $(CFLAGS_libxenctrl) - LDLIBS += $(LDLIBS_libxenctrl) diff --git a/debian/patches/tools-xenmon-prefix.diff b/debian/patches/tools-xenmon-prefix.diff deleted file mode 100644 index f495af80e9..0000000000 --- a/debian/patches/tools-xenmon-prefix.diff +++ /dev/null @@ -1,37 +0,0 @@ -From 68f545c1e9227d64d47407a9f05d918a819f3733 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:06 +0200 -Subject: tools-xenmon-prefix.diff - -Patch-Name: tools-xenmon-prefix.diff ---- - tools/xenmon/Makefile | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile -index 20ea100..cb6d7f8 100644 ---- a/tools/xenmon/Makefile -+++ b/tools/xenmon/Makefile -@@ -16,6 +16,7 @@ include $(XEN_ROOT)/tools/Rules.mk - CFLAGS += -Werror - CFLAGS += $(CFLAGS_libxenctrl) - LDLIBS += $(LDLIBS_libxenctrl) -+LDFLAGS += $(call LDFLAGS_RPATH,../lib) - - SCRIPTS = xenmon.py - -@@ -27,10 +28,10 @@ build: xentrace_setmask xenbaked - - .PHONY: install - install: build -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) -- $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked -- $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(sbindir)/xentrace_setmask -- $(INSTALL_PROG) xenmon.py $(DESTDIR)$(sbindir)/xenmon.py -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PROG) xenbaked $(DESTDIR)$(LIBEXEC_BIN)/xenbaked -+ $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(LIBEXEC_BIN)/xentrace_setmask -+ $(INSTALL_PROG) xenmon.py $(DESTDIR)$(LIBEXEC_BIN)/xenmon.py - - .PHONY: clean - clean: diff --git a/debian/patches/tools-xenpaging-prefix.diff b/debian/patches/tools-xenpaging-prefix.diff deleted file mode 100644 index 4cf4f7aa06..0000000000 --- a/debian/patches/tools-xenpaging-prefix.diff +++ /dev/null @@ -1,23 +0,0 @@ -From b126461dd534c9ea60603e5680a1009fb7d8c57c Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:08 +0200 -Subject: tools-xenpaging-prefix.diff - -Patch-Name: tools-xenpaging-prefix.diff ---- - tools/xenpaging/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile -index 2407a30..f3747b3 100644 ---- a/tools/xenpaging/Makefile -+++ b/tools/xenpaging/Makefile -@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk - # xenpaging.c and file_ops.c incorrectly use libxc internals - CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) -I$(XEN_ROOT)/tools/libxc - LDLIBS += $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS) --LDFLAGS += $(PTHREAD_LDFLAGS) -+LDFLAGS += $(PTHREAD_LDFLAGS) $(call LDFLAGS_RPATH,../lib) - - POLICY = default - diff --git a/debian/patches/tools-xenpmd-prefix.diff b/debian/patches/tools-xenpmd-prefix.diff deleted file mode 100644 index 46214b7af1..0000000000 --- a/debian/patches/tools-xenpmd-prefix.diff +++ /dev/null @@ -1,25 +0,0 @@ -From 4765ac594756870c30cf1963530b1f682035bc00 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 13 Dec 2014 19:37:02 +0100 -Subject: tools-xenpmd-prefix.diff - -Patch-Name: tools-xenpmd-prefix.diff ---- - tools/xenpmd/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/xenpmd/Makefile b/tools/xenpmd/Makefile -index 55e8fc5..470e963 100644 ---- a/tools/xenpmd/Makefile -+++ b/tools/xenpmd/Makefile -@@ -11,8 +11,8 @@ all: xenpmd - - .PHONY: install - install: all -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) -- $(INSTALL_PROG) xenpmd $(DESTDIR)$(sbindir) -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PROG) xenpmd $(DESTDIR)$(LIBEXEC_BIN) - - .PHONY: clean - clean: diff --git a/debian/patches/tools-xenstat-abiname.diff b/debian/patches/tools-xenstat-abiname.diff deleted file mode 100644 index c939162180..0000000000 --- a/debian/patches/tools-xenstat-abiname.diff +++ /dev/null @@ -1,66 +0,0 @@ -From a3f4d066fa36b8dfcaab81e8e6fc7296a6927c67 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:50 +0200 -Subject: tools-xenstat-abiname.diff - -Patch-Name: tools-xenstat-abiname.diff ---- - tools/xenstat/libxenstat/Makefile | 22 +++++----------------- - 1 file changed, 5 insertions(+), 17 deletions(-) - -diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile -index 850d24a..7c13c06 100644 ---- a/tools/xenstat/libxenstat/Makefile -+++ b/tools/xenstat/libxenstat/Makefile -@@ -18,18 +18,14 @@ include $(XEN_ROOT)/tools/Rules.mk - LDCONFIG=ldconfig - MAKE_LINK=ln -sf - --MAJOR=0 --MINOR=0 -- - LIB=src/libxenstat.a --SHLIB=src/libxenstat.so.$(MAJOR).$(MINOR) --SHLIB_LINKS=src/libxenstat.so.$(MAJOR) src/libxenstat.so --OBJECTS-y=src/xenstat.o src/xenstat_qmp.o -+SHLIB=src/libxenstat.so -+OBJECTS-y=src/xenstat.o - OBJECTS-$(CONFIG_Linux) += src/xenstat_linux.o - OBJECTS-$(CONFIG_SunOS) += src/xenstat_solaris.o - OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o - OBJECTS-$(CONFIG_FreeBSD) += src/xenstat_freebsd.o --SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR) -+SONAME_FLAGS=-Wl,$(SONAME_LDFLAG),libxenstat.so - - CFLAGS+=-fPIC - CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -include $(XEN_ROOT)/tools/config.h -@@ -38,7 +34,7 @@ LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) - LDLIBS-$(CONFIG_SunOS) += -lkstat - - .PHONY: all --all: $(LIB) $(SHLIB) $(SHLIB_LINKS) -+all: $(LIB) $(SHLIB) - - $(LIB): $(OBJECTS-y) - $(AR) rc $@ $^ -@@ -48,19 +44,11 @@ $(SHLIB): $(OBJECTS-y) - $(CC) $(LDFLAGS) $(SONAME_FLAGS) $(SHLIB_LDFLAGS) -o $@ \ - $(OBJECTS-y) $(LDLIBS-y) $(APPEND_LDFLAGS) - --src/libxenstat.so.$(MAJOR): $(SHLIB) -- $(MAKE_LINK) $( -Date: Sat, 5 Jul 2014 11:47:09 +0200 -Subject: tools-xenstat-prefix.diff - -Patch-Name: tools-xenstat-prefix.diff ---- - tools/xenstat/libxenstat/Makefile | 6 ++++-- - tools/xenstat/xentop/Makefile | 6 ++++-- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile -index 7c13c06..75b4b68 100644 ---- a/tools/xenstat/libxenstat/Makefile -+++ b/tools/xenstat/libxenstat/Makefile -@@ -20,7 +20,7 @@ MAKE_LINK=ln -sf - - LIB=src/libxenstat.a - SHLIB=src/libxenstat.so --OBJECTS-y=src/xenstat.o -+OBJECTS-y=src/xenstat.o src/xenstat_qmp.o - OBJECTS-$(CONFIG_Linux) += src/xenstat_linux.o - OBJECTS-$(CONFIG_SunOS) += src/xenstat_solaris.o - OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o -@@ -46,9 +46,11 @@ $(SHLIB): $(OBJECTS-y) - - .PHONY: install - install: all -+ $(INSTALL_DIR) $(DESTDIR)$(includedir) -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_LIB) - $(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a -- $(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(libdir) -+ $(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(LIBEXEC_LIB) - - PYLIB=bindings/swig/python/_xenstat.so - PYMOD=bindings/swig/python/xenstat.py -diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile -index 1cc393f..167e5db 100644 ---- a/tools/xenstat/xentop/Makefile -+++ b/tools/xenstat/xentop/Makefile -@@ -19,7 +19,9 @@ all install xentop: - else - - CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat) -+LDFLAGS += $(call LDFLAGS_RPATH,../lib) - LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm -lyajl -+LDLIBS += $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) - CFLAGS += -DHOST_$(XEN_OS) - - # Include configure output (config.h) -@@ -31,8 +33,8 @@ all: xentop - - .PHONY: install - install: xentop -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) -- $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PROG) xentop $(DESTDIR)$(LIBEXEC_BIN)/xentop - - endif - diff --git a/debian/patches/tools-xenstore-compatibility.diff b/debian/patches/tools-xenstore-compatibility.diff deleted file mode 100644 index b469fdf403..0000000000 --- a/debian/patches/tools-xenstore-compatibility.diff +++ /dev/null @@ -1,62 +0,0 @@ -From 28d59f50f74be1598e306dccebbf037046452097 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:36 +0200 -Subject: tools-xenstore-compatibility.diff - -Patch-Name: tools-xenstore-compatibility.diff ---- - tools/xenstore/include/xenstore.h | 1 + - tools/xenstore/xenstore_client.c | 2 +- - tools/xenstore/xs.c | 4 +++- - 3 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h -index 42c0dc7..8a9c5c2 100644 ---- a/tools/xenstore/include/xenstore.h -+++ b/tools/xenstore/include/xenstore.h -@@ -25,6 +25,7 @@ - - #define XS_OPEN_READONLY 1UL<<0 - #define XS_OPEN_SOCKETONLY 1UL<<1 -+#define XS_OPEN_DOMAINONLY 1UL<<2 - - /* - * Setting XS_UNWATCH_FILTER arranges that after xs_unwatch, no -diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c -index 3d14d37..d7ae1ec 100644 ---- a/tools/xenstore/xenstore_client.c -+++ b/tools/xenstore/xenstore_client.c -@@ -636,7 +636,7 @@ main(int argc, char **argv) - max_width = ws.ws_col - 2; - } - -- xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : 0); -+ xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : XS_OPEN_DOMAINONLY); - if (xsh == NULL) err(1, "xs_open"); - - again: -diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c -index d1e01ba..be82927 100644 ---- a/tools/xenstore/xs.c -+++ b/tools/xenstore/xs.c -@@ -281,17 +281,19 @@ struct xs_handle *xs_daemon_open_readonly(void) - - struct xs_handle *xs_domain_open(void) - { -- return xs_open(0); -+ return xs_open(XS_OPEN_DOMAINONLY); - } - - struct xs_handle *xs_open(unsigned long flags) - { - struct xs_handle *xsh = NULL; - -+ if (!(flags & XS_OPEN_DOMAINONLY)) { - if (flags & XS_OPEN_READONLY) - xsh = get_handle(xs_daemon_socket_ro()); - else - xsh = get_handle(xs_daemon_socket()); -+ } - - if (!xsh && !(flags & XS_OPEN_SOCKETONLY)) - xsh = get_handle(xs_domain_dev()); diff --git a/debian/patches/tools-xenstore-prefix.diff b/debian/patches/tools-xenstore-prefix.diff deleted file mode 100644 index a4a7a46236..0000000000 --- a/debian/patches/tools-xenstore-prefix.diff +++ /dev/null @@ -1,53 +0,0 @@ -From ae26990012e9cbbf3c49b4dd3c2a6df3b81d6019 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:12 +0200 -Subject: tools-xenstore-prefix.diff - -Patch-Name: tools-xenstore-prefix.diff ---- - tools/xenstore/Makefile | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile -index 1b4a494..f837c6e 100644 ---- a/tools/xenstore/Makefile -+++ b/tools/xenstore/Makefile -@@ -18,6 +18,8 @@ LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) - CFLAGS += $(CFLAGS-y) - LDFLAGS += $(LDFLAGS-y) - -+LDFLAGS_libxenctrl += $(call LDFLAGS_RPATH,../lib) -+ - CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod - CLIENTS += xenstore-write xenstore-ls xenstore-watch - -@@ -75,10 +77,10 @@ endif - init-xenstore-domain.o: CFLAGS += $(CFLAGS_libxenguest) - - init-xenstore-domain: init-xenstore-domain.o $(LIBXENSTORE) -- $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -o $@ $(APPEND_LDFLAGS) -+ $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(call LDFLAGS_RPATH,../lib) -o $@ $(APPEND_LDFLAGS) - - xenstored: $(XENSTORED_OBJS) -- $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS) -+ $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) $(call LDFLAGS_RPATH,../lib) -o $@ $(APPEND_LDFLAGS) - - xenstored.a: $(XENSTORED_OBJS) - $(AR) cr $@ $^ -@@ -131,13 +133,13 @@ tarball: clean - install: all - $(INSTALL_DIR) $(DESTDIR)$(bindir) - $(INSTALL_DIR) $(DESTDIR)$(includedir) -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_DIR) $(DESTDIR)$(includedir)/xenstore-compat - ifeq ($(XENSTORE_XENSTORED),y) -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) - $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED) -- $(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir) -+ $(INSTALL_PROG) xenstored $(DESTDIR)$(LIBEXEC_BIN) - endif -- $(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir) -+ $(INSTALL_PROG) xenstore-control $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) xenstore $(DESTDIR)$(bindir) - set -e ; for c in $(CLIENTS) ; do \ - ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \ diff --git a/debian/patches/tools-xentrace-prefix.diff b/debian/patches/tools-xentrace-prefix.diff deleted file mode 100644 index 43d880c4f0..0000000000 --- a/debian/patches/tools-xentrace-prefix.diff +++ /dev/null @@ -1,41 +0,0 @@ -From 94b9f1f7d68bd52d07a4709e7cc9c99cd7ab9647 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:47:14 +0200 -Subject: tools-xentrace-prefix.diff - -Patch-Name: tools-xentrace-prefix.diff ---- - tools/xentrace/Makefile | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile -index 6c13cd1..a436718 100644 ---- a/tools/xentrace/Makefile -+++ b/tools/xentrace/Makefile -@@ -5,6 +5,7 @@ CFLAGS += -Werror - - CFLAGS += $(CFLAGS_libxenctrl) - LDLIBS += $(LDLIBS_libxenctrl) $(ARGP_LDFLAGS) -+LDFLAGS += $(call LDFLAGS_RPATH,../lib) - - BIN-$(CONFIG_X86) = xenalyze - BIN = $(BIN-y) -@@ -20,15 +21,9 @@ build: $(BIN) $(SBIN) $(LIBBIN) - - .PHONY: install - install: build -- $(INSTALL_DIR) $(DESTDIR)$(bindir) -- $(INSTALL_DIR) $(DESTDIR)$(sbindir) -- [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) --ifneq ($(BIN),) -- $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir) --endif -- $(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir) -- $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) -- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PROG) $(BIN) $(SBIN) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) -+ $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(LIBEXEC_BIN) - - .PHONY: clean - clean: diff --git a/debian/patches/version.diff b/debian/patches/version.diff deleted file mode 100644 index 5850257b68..0000000000 --- a/debian/patches/version.diff +++ /dev/null @@ -1,167 +0,0 @@ -From 200fc5d2a81fd82c09c574bb5fe69060a6ba2554 Mon Sep 17 00:00:00 2001 -From: Bastian Blank -Date: Sat, 5 Jul 2014 11:46:43 +0200 -Subject: version - -Patch-Name: version.diff ---- - xen/Makefile | 8 +++++--- - xen/common/kernel.c | 4 ++-- - xen/common/version.c | 21 +++++++++++---------- - xen/drivers/char/console.c | 9 +++------ - xen/include/xen/compile.h.in | 8 ++++---- - xen/include/xen/version.h | 8 ++++---- - 6 files changed, 29 insertions(+), 29 deletions(-) - -diff --git a/xen/Makefile b/xen/Makefile -index 4c54e9b..007b1a0 100644 ---- a/xen/Makefile -+++ b/xen/Makefile -@@ -129,7 +129,7 @@ delete-unfresh-files: - @mv -f $@.tmp $@ - - # compile.h contains dynamic build info. Rebuilt on every 'make' invocation. --include/xen/compile.h: include/xen/compile.h.in .banner -+include/xen/compile.h: include/xen/compile.h.in - @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ - -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ - -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ -@@ -140,9 +140,11 @@ include/xen/compile.h: include/xen/compile.h.in .banner - -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ - -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ - -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "unavailable")!g' \ -+ -e 's/@@system_distribution@@/$(shell lsb_release -is)/g' \ -+ -e 's/@@system_maintainer_domain@@/$(shell cd ../../../..; dpkg-parsechangelog | sed -ne 's,^Maintainer: .[^<]*<[^@>]*@\([^>]*\)>,\1,p')/g' \ -+ -e 's/@@system_maintainer_local@@/$(shell cd ../../../..; dpkg-parsechangelog | sed -ne 's,^Maintainer: .[^<]*<\([^@>]*\)@.*>,\1,p')/g' \ -+ -e 's/@@system_version@@/$(shell cd ../../../..; dpkg-parsechangelog | awk '/^Version:/ {print $$2}')/g' \ - < include/xen/compile.h.in > $@.new -- @cat .banner -- @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new - @mv -f $@.new $@ - - include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s -diff --git a/xen/common/kernel.c b/xen/common/kernel.c -index 6a3196a..80c1950 100644 ---- a/xen/common/kernel.c -+++ b/xen/common/kernel.c -@@ -251,8 +251,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) - - memset(&info, 0, sizeof(info)); - safe_strcpy(info.compiler, xen_compiler()); -- safe_strcpy(info.compile_by, xen_compile_by()); -- safe_strcpy(info.compile_domain, xen_compile_domain()); -+ safe_strcpy(info.compile_by, xen_compile_system_maintainer_local()); -+ safe_strcpy(info.compile_domain, xen_compile_system_maintainer_domain()); - safe_strcpy(info.compile_date, xen_compile_date()); - if ( copy_to_guest(arg, &info, 1) ) - return -EFAULT; -diff --git a/xen/common/version.c b/xen/common/version.c -index b152e27..7b5af55 100644 ---- a/xen/common/version.c -+++ b/xen/common/version.c -@@ -11,19 +11,24 @@ const char *xen_compile_time(void) - return XEN_COMPILE_TIME; - } - --const char *xen_compile_by(void) -+const char *xen_compile_system_distribution(void) - { -- return XEN_COMPILE_BY; -+ return XEN_COMPILE_SYSTEM_DISTRIBUTION; - } - --const char *xen_compile_domain(void) -+const char *xen_compile_system_maintainer_local(void) - { -- return XEN_COMPILE_DOMAIN; -+ return XEN_COMPILE_SYSTEM_MAINTAINER_LOCAL; - } - --const char *xen_compile_host(void) -+const char *xen_compile_system_maintainer_domain(void) - { -- return XEN_COMPILE_HOST; -+ return XEN_COMPILE_SYSTEM_MAINTAINER_DOMAIN; -+} -+ -+const char *xen_compile_system_version(void) -+{ -+ return XEN_COMPILE_SYSTEM_VERSION; - } - - const char *xen_compiler(void) -@@ -51,7 +56,3 @@ const char *xen_changeset(void) - return XEN_CHANGESET; - } - --const char *xen_banner(void) --{ -- return XEN_BANNER; --} -diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c -index fce4cc8..0bd02ce 100644 ---- a/xen/drivers/char/console.c -+++ b/xen/drivers/char/console.c -@@ -727,14 +727,11 @@ void __init console_init_preirq(void) - serial_set_rx_handler(sercon_handle, serial_rx); - - /* HELLO WORLD --- start-of-day banner text. */ -- spin_lock(&console_lock); -- __putstr(xen_banner()); -- spin_unlock(&console_lock); -- printk("Xen version %d.%d%s (%s@%s) (%s) debug=%c %s\n", -+ printk("Xen version %d.%d%s (%s %s) (%s@%s) (%s) debug=%c %s\n", - xen_major_version(), xen_minor_version(), xen_extra_version(), -- xen_compile_by(), xen_compile_domain(), -+ xen_compile_system_distribution(), xen_compile_system_version(), -+ xen_compile_system_maintainer_local(), xen_compile_system_maintainer_domain(), - xen_compiler(), debug_build() ? 'y' : 'n', xen_compile_date()); -- printk("Latest ChangeSet: %s\n", xen_changeset()); - - if ( opt_sync_console ) - { -diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in -index 440ecb2..0c3ca58 100644 ---- a/xen/include/xen/compile.h.in -+++ b/xen/include/xen/compile.h.in -@@ -1,8 +1,9 @@ - #define XEN_COMPILE_DATE "@@date@@" - #define XEN_COMPILE_TIME "@@time@@" --#define XEN_COMPILE_BY "@@whoami@@" --#define XEN_COMPILE_DOMAIN "@@domain@@" --#define XEN_COMPILE_HOST "@@hostname@@" -+#define XEN_COMPILE_SYSTEM_DISTRIBUTION "@@system_distribution@@" -+#define XEN_COMPILE_SYSTEM_MAINTAINER_DOMAIN "@@system_maintainer_domain@@" -+#define XEN_COMPILE_SYSTEM_MAINTAINER_LOCAL "@@system_maintainer_local@@" -+#define XEN_COMPILE_SYSTEM_VERSION "@@system_version@@" - #define XEN_COMPILER "@@compiler@@" - - #define XEN_VERSION @@version@@ -@@ -10,4 +11,3 @@ - #define XEN_EXTRAVERSION "@@extraversion@@" - - #define XEN_CHANGESET "@@changeset@@" --#define XEN_BANNER \ -diff --git a/xen/include/xen/version.h b/xen/include/xen/version.h -index 81a3c7d..c25937e 100644 ---- a/xen/include/xen/version.h -+++ b/xen/include/xen/version.h -@@ -3,14 +3,14 @@ - - const char *xen_compile_date(void); - const char *xen_compile_time(void); --const char *xen_compile_by(void); --const char *xen_compile_domain(void); --const char *xen_compile_host(void); -+const char *xen_compile_system_distribution(void); -+const char *xen_compile_system_maintainer_domain(void); -+const char *xen_compile_system_maintainer_local(void); -+const char *xen_compile_system_version(void); - const char *xen_compiler(void); - unsigned int xen_major_version(void); - unsigned int xen_minor_version(void); - const char *xen_extra_version(void); - const char *xen_changeset(void); --const char *xen_banner(void); - - #endif /* __XEN_VERSION_H__ */ -- 2.30.2